-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Tensorflow BackupAndRestore method does not work #20712
Comments
Hi @antipisa - Thanks for reporting the issue. Here getting error in BackupAndRestore callback method is because of model is not build yet(no trainable parameters are there as weights are not assigned). Further more reference where you can find error will be raise if model is not build. By building the model with some input shape |
@mehtamansi29 does one have to call model.build both the first time the model is instantiated and then again after restarting interruption? |
@mehtamansi29 a common use case for this would be training is interrupted due to computer crash / kernel restart, so one would have to re-compile the model and load and restore from backup. But this requires compiling the model again and so presumably one must also call build again |
Yes @antipisa - In the case computer crash/kernel restart need to build model again after interruption because model configuration(weights,optimizer..) are lost. So for that case need to rebuild the model. If model architecture and nodel configuration doesn't change then no need to reinstantiated after interruption |
Thank you! |
I see a conflict of my understanding here. Once training proceeds as per |
I copied the example code here and it raises a ValueError with Python 3.11 and Tensorflow 2.17:
Doesn't that defeat the purpose of backupAndRestore?
The text was updated successfully, but these errors were encountered: