My image looks identical to the content image. The only thing I see in this lab that could cause trouble is the note, " Take note that you will not need a regularization parameter in this exercise so we only provided the style and content weights as arguments."
Should I be setting the unused parameters to “None”? Should I put in variable names that don’t exist?
Why is the tf.add_n still the same if part of what is being passed into it is nothing?
I’ve checked my outputs and they seem appropriate. But the gradient and loss functions are a black box and I can’t see how they’re acting.
Not sure if I understand the question, or the problem, but if you are refering to the call to the Gradient function you only shoud pass the loss and the image.
The problem is that it isn’t learning.
get_style_content_loss is called by calculate_gradients, which is called by update_image_with_style
The note I quoted above is in the intro to “calculate_gradients” . I don’t know what is going wrong, but there are clearly parameters that are not used in the function call.
tf.add_n uses zip to bring in one of the values, which is then 0 when it is actually called.
I can’t find any place that I could be changing anything for the worst (and I’ve checked repeatedly) other than in these functions related to the gradient.
@Dan_Wigodsky If you want send-me your notebook, but I’m leaving now and I can’t revise it until tomorrow night. I’m going to mention the other Mentors just in case any can assist you sooner than me.
Can you send your notebook via personal DM. Click on the name of the mentor and then message.
In case you are facing any error or your model training is showing not the required accuracy you can share the screenshot here.
The last week of this course is a bit tough, so don’t worry, you will get the solution.
The only matter I am not able to understand with your explanation till now if you are facing an error or you are not getting the required or expected output.
Can you please let us know which one of these is your issue.
Load InceptionV3 with the imagenet weights and without the fully-connected layer at the top of the network
THIS CODE RECALLED INCORRECTLY, YOU HAVE USED tmp directory file name.
Create the model that outputs the content and style layers
THERE IS AN ERROR FOR THIS CODE LINE. IT SHOULD BE tf.keras.models.Model
Why have you left these NONE ( it is looking a particular code here, hint check the code line you wrote in the def calculus_gradient section just before this code, you will know what to write in place of this none)
in def calculate_gradients
get the style and content loss
loss = CORRECT CODE(CORRECT CODE, None(YOU FORGOT TO WRITE CODE, CORRECT CODE,
None(YOU FORGOT TO WRITE CODE, CORRECT CODE, CORRECT CODE)
def fit_style_transfer
I think you still have not completed your assignment as this section codes are yet to be written
START CODE HERE
# Update the image with the style using the function that you defined
### END CODE HERE