Could this code be modified to be compatible with tensorflow 2.0+?
fungtion opened this issue · 2 comments
fungtion commented
I ran this code with tensorflow 2.2, and repalce tf
with tf.compat.v1
, but still an error prompt that:
File "models/pggan_tf_official/tfutil.py", line 477, in _init_graph
out_expr = self._build_func(*self.input_templates, is_template_graph=True, **self.static_kwargs)
File "<string>", line 175, in G_paper
AttributeError: module 'tensorflow' has no attribute 'get_variable'
I tried to replace tf.get_variable
with tf.Variable
but failed, I'm new to tensorflow, can you help me?
ShenYujun commented
Please refer to the official tutorial. Or, you can just set up an environment based on tensorflow 1.14.
fungtion commented
OK, thanks.