tf_unet icon indicating copy to clipboard operation
tf_unet copied to clipboard

Gradients are zero after model is restored

Open ameliajimenez opened this issue 8 years ago • 3 comments

grads Hello,

Someone else also has the problem that the gradients are initialized to zero after restoring the model? I would like to instead load the weights from the last saved point of training? Can someone help please?

Best regards, Amelia.

ameliajimenez avatar Jun 07 '17 08:06 ameliajimenez

How are you reloading the model?

Is the prediction working when using the predict function of the model?

jakeret avatar Jun 07 '17 19:06 jakeret

Hi, thanks for the answer!

I haven't modified the code, so the model is restored in the same way as the code here.

Yes, prediction is working.

ameliajimenez avatar Jun 07 '17 20:06 ameliajimenez

When creating a new instance of Unet the global graph is resettet using tf.reset_default_graph() to avoid problems with previous graphs. Not sure if this is causing the issue you're seeing

jakeret avatar Jun 12 '17 18:06 jakeret