CartoonGan-tensorflow icon indicating copy to clipboard operation
CartoonGan-tensorflow copied to clipboard

AttributeError: module 'tensorflow' has no attribute 'get_default_graph

Open WenheLI opened this issue 5 years ago • 3 comments

Thanks for your excellent work! I got an error of AttributeError: module 'tensorflow' has no attribute 'get_default_graph when I try to run your code. It seems to be a dependency issue do you have any clue?

WenheLI avatar Jun 30 '19 03:06 WenheLI

When usingpython inference_with_saved_model.py --other_parameters, I wander if you @WenheLI ever have dealed with this problem 'ImportError: cannot import name 'export_saved_model'

HuangDanGeeker avatar Jul 12 '19 15:07 HuangDanGeeker

Thanks for your excellent work! I got an error of AttributeError: module 'tensorflow' has no attribute 'get_default_graph when I try to run your code. It seems to be a dependency issue do you have any clue?

Can you kindly provide the commands resulting in the error?

mnicnc404 avatar Aug 05 '19 08:08 mnicnc404

Thanks for your excellent work! I got an error of AttributeError: module 'tensorflow' has no attribute 'get_default_graph when I try to run your code. It seems to be a dependency issue do you have any clue?

Can you kindly provide the commands resulting in the error?

[2020-07-02 16:19:32] [Trainer] [INFO] Initializing generator with batch_size: 4, input_size: 256... Traceback (most recent call last): File "train.py", line 696, in main(**kwargs) File "train.py", line 632, in main t.pretrain_generator() File "train.py", line 337, in pretrain_generator generator = Generator(base_filters=2 if self.debug else 64, light=self.light) File "/root/CartoonGan-tensorflow-master/generator.py", line 29, in init pad_type=pad_type) File "/root/CartoonGan-tensorflow-master/layers.py", line 66, in init self.model.add(get_norm(norm_type)) File "/root/CartoonGan-tensorflow-master/layers.py", line 46, in get_norm return InstanceNormalization() File "/root/anaconda3/lib/python3.6/site-packages/keras_contrib-2.0.8-py3.6.egg/keras_contrib/layers/normalization/instancenormalization.py", line 62, in init File "/root/anaconda3/lib/python3.6/site-packages/keras/engine/base_layer.py", line 132, in init name = to_snake_case(prefix) + '' + str(K.get_uid(prefix)) File "/root/anaconda3/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 74, in get_uid graph = tf.get_default_graph()

JOJO-JAVA avatar Jul 02 '20 09:07 JOJO-JAVA