-
Notifications
You must be signed in to change notification settings - Fork 14
Error in Roundtrip Tutorial: "Checkpoint was expecting d_optimizer to be a trackable object” #18
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
Comments
Hi, could you let me know your python and tensorflow versions? So that I could further look into this issue. Thanks! |
Hi yes, I am using python 3.7.16 and tensorflow 2.8.0. However after adjusting the package versions to align with those specified in |
Since g_e_optimizer and d_optimizer are instantiated with the same code, it is strange why d_optimizer caused the error |
If you run main.py (https://github.com/kimmo1019/Roundtrip/blob/master/src/main.py) please try datasets such as “indep_gmm”, “eight_octagon_gmm” or “involute”. Are you able to run on these non-image datasets? |
Yes, regarding the first two questions, which we discussed in email:
Previously I was running into errors with trying #2, but using the non-image datasets, specifically "involute" (and "indep_gmm" which is currently running in the background), works well! I didn't see the "eight_octagon_gmm" .yaml file. |
Great! since main.py can be run well using "involute" dataset, you can find that the 15 line is exactly |
Considering your demand on adapting Roundtrip to single cell applications, it might be more flexible to directly use main.py. What do you think? Please let me know if you have further questions. |
Okay, sounds good. Thank you so much for your help! Just to clarify, the |
Yes, the main different is the input. If the input is image, which is 2D, then the architecture may need change from FFN to Conv2D. As long as you input is a vector (1D) for each sample, then it is fine. Once you run |
Description:
I encountered an error while running the Roundtrip tutorial from the repository (cloned directly from GitHub). The error suggests that
d_optimizer
is not trackable when used in a TensorFlowCheckpoint
. It seems to be related to Keras optimizers.Steps to reproduce:
Running the file
Roundtrip/src/tutorial.ipynb
Specifically the cell that produces the error is the third one at line:
model = pyrt.Roundtrip(params=params,random_seed=123)
Error:
ValueError:
Checkpointwas expecting d_optimizer to be a trackable object (an object derived from
Trackable), got <keras.src.optimizers.adam.Adam object at 0x7f8abedf72c0>. If you believe this object should be trackable (i.e. it is part of the TensorFlow Python API and manages state), please open an issue.
Any guidance on this issue would be greatly appreciated!
The text was updated successfully, but these errors were encountered: