-
Notifications
You must be signed in to change notification settings - Fork 50
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
Saving model weights #4
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When completing this project using TF2 many functions in base_model can't work due to TF2 not using Sessions. In serve.py the function restore_session() is called, what changes should be made to the code to do this in TF2.
I have tried
checkpoint_path = "training_3/cp.ckpt"#defining path where weights will be saved
checkpoint_dir = os.path.dirname(checkpoint_path)
cp_callback = tf.keras.callbacks.ModelCheckpoint(filepath=checkpoint_path,
save_weights_only=True,
verbose=1)#defining a function that is called in my model.fit by using: callbacks=[cp_callback])
I can then call load_weights but I am struggling with doing this within the get_model_api() in serve.py
Any help with this issue would be great, thanks.
The text was updated successfully, but these errors were encountered: