-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Variable <tf.Variable 'conv2d_286/kernel:0' shape=(3, 3, 3, 32) dtype=float32> has None
for gradient. Please make sure that all of your ops have a gradient defined (i.e. are differentiable).
#3
Comments
Hi. Does your model train if you don't include any of the pruning calls? Just to try to understand where the problem is. Thanks |
Yes, the model train if I don't use
and directly fit the model |
The Complete Traceback is as follows:
|
Also Instead If anyone can provide a working example of pruning InceptionV3 or Resnet, It will help a lot. Thank you |
Hi Rishab, Thanks for the bug report. I was able to try out the code you pasted (almost the same) and it worked for me. I didn't see the error you are getting. I have a few questions.
The following is the code I used.
This runs training fine for me. Perhaps you can try it out and see if it solves your problem. If possible can you share the exact code you are running from construction to fit. It would help if I can reproduce it locally. Thanks. |
Yes, you are right Just, One more thing, Is low magnitude pruning of InceptionV3 possible on Google-Collab GPU Resources, It's just that when I run your/mine code there, the runtime disconnects. |
Pruning does not require resources significantly different from training the model. It only adds a small overhead. If your resources are capable of training, they should be capable of pruning as well. As to Google-Colab, I can't answer that. You'll have to estimate your resource requirements, and find computation resources accordingly. |
For anyone who still could not solve this problem: if you are using Keras, this error might be caused by the custom loss and the model.add_loss function. |
I am Pruning an InceptionV3 model
So I create a end to end model
Then I prune the model by using this command
But When I try to Fit the data for training
I get the following Error:
Can Anybody please help with this, I can't seem to find a solution for this on StackOverflow or elsewhere.
Thank you
The text was updated successfully, but these errors were encountered: