Open VishalBalajiSivaraman opened 11 months ago
Could you describe what this would do? We haven't worked with tf v1 for a while and I'm not sure what this is trying to fix.
Hello,
I was working on a study using your GitHub code and encountered an issue with compatibility when running your example Colab notebook with your suggested method. I initially thought the problem was related to model saving, but I managed to resolve that by using a different model-saving approach. However, I continued to encounter unusual errors with your code, which, in my opinion, appeared to be well-structured. After investigating further, I realized that the code was originally implemented using Tensorflow 1.x, which is no longer current. To restore the functionality of the code and fix all errors, including the model saving issue, I found a simple solution: replacing the Tensorflow import commands with import tensorflow.compat.v1 as tf, especially in your train and test TensorFlow scripts. In short, this command allows us to use code originally designed for TensorFlow 1.x while benefiting from the newer TensorFlow versions, which currently is TensorFlow 2.x. I have attached screenshots for your reference.
Thanks
Same problem here, lots of errors with tf 2.16. What is the recommended version?
tf changes so quickly,. but it seems that 2.14 is stable with vxm code. Could you tell us if you still get these errors? I'll tag @mu40 on the thread as well as he has experience with a myriad of tf versions
ok thanks, tried bunch of them but got multiples errors (besides obvious ones like naming changes of keras mse loss) related to tensor.numpy() or type mismatches when calling model.fit function, different errors for each version I tried...
Switched to PyTorch, worked instant !
Kindly update the import line in your train.py and test.py scripts to use import tensorflow.compat.v1 as tf to mitigate compatibility errors during code execution in TensorFlow 2.x versions.