Open jkfran opened 1 year ago
@jkfran
my TensorFlow version is 2.6.2, facing the very same issue, you mentioned in the beginning.
you said you updated the script using tf_upgrade_v2 can you tell me what is that , how to do it.? i visited the link , but didn't understood properly!!
@SSahas I'm not the OP, but here's how I managed to upgrade retrain.py to TF 2:
tf_upgrade_v2 --infile hub/examples/image_retraining/retrain.py --inplace
. This gave an error which I was able to fix by following Solution 1 in this post.I validated the change by looking at the py file and the report.txt that gets generated. They look good to me. Running the retrain script, however, gives a different error which I have not been able to resolve. You can find the latest code on my fork of this repo.
@jkfran @SSahas @Rohan-Datta Looks like an issue with @dependabot updates for tensorflow. I have not tried the latest versions. can you please check this with older versions as mentioned in this? Let me know which latest version works and we can open a PR for it.
@ritwik12
As of now, 2.7.2 is working fine.
I converted the code in retrain.py
to TensorFlow 2.x and I was then able to resolve the error that @jkfran mentioned in the original comment by disabling eager execution as is suggested in this post.
I was also able to retrain and test the model successfully.
I've pushed the updated files to my fork of this repo.
Thank you @Rohan-Datta for telling me how to upgrade retarin.py and the solution for @jkfran mentioned.
Now I am able to train the model successfully.
Hello, I am entirely new to TensorFlow, but I am trying to run the retrain script, and it looks like this file is not coded for TensorFlow 2.7.2, which is the version specified in the requirements.txt.
This is the error that I am getting:
I was able to update the script using tf_upgrade_v2 (https://www.tensorflow.org/guide/migrate/upgrade) and run it, but this is the error that I am getting after doing that: