Week 1 Assignement 1

I have implemented the solution with the same steps as the Neural Style Transfer lab but I’m getting this error which I don’t understand what is it and how to fix Copy_of_C4W1_Assignment.ipynb (1.1 MB)

TypeError: Cannot convert 'input_4' to EagerTensor of dtype float

This error message is indeed not very explanatory, but looking at the code (thanks for linking your assignment!) I’ve found you were passing the wrong argument to the function inception_model(). You need to pass it the names of the layers you chose, but instead you passed the image array. That happens in the function get_style_image_features().

So take a look at that and make sure you pass the list of strings corresponding to the names of the desired layers of the inception model you defined earlier in the code :wink:

Thank you so much that solves my problem :purple_heart::pray:
but after that, I’m facing this problem with the grader

Your image achieved a structural similarity index of 0.45 with the reference image. At least 0.7 is required to pass. Please try again.

do you know how I can fix this problem?

1 Like

I tried different Conv layers and it works the first assignment passed succesfully :star_struck:

1 Like

Very glad to hear!! When I was doing that assignment I also had a little trouble getting that image similarity high enough. Tinkering with paramaters and details is both a joy and a frustration of working with neural models :sweat_smile:

1 Like

Hi . i’m facing with the same error , would you help me to figure out the solution