As Tensorflow 1 becomes unsupported in Google Colab and StyleGAN2-ADA only works with Tensorflow 1. Can anyone help what I should do to solve this issue?
Asked
Active
Viewed 1,816 times
0
-
Is there a reason to not move to the [pytorch version](https://github.com/NVlabs/stylegan2-ada-pytorch)? – arowell Aug 31 '22 at 18:52
2 Answers
0
This might work, if you want to run TF1 code under a recent version of TF2
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
(Instead of import tensorflow as tf, of course)
In TF 2.9.1 this is available but deprecated, and it will likely disappear in a not-too-distant future version

David Harris
- 646
- 3
- 11
-
I've got this error after writing this solution "Import "tensorflow.compat.v1" could not be resolved", how can I solve it? – OmT Mar 31 '23 at 22:44