keras_to_tensorflow icon indicating copy to clipboard operation
keras_to_tensorflow copied to clipboard

AttributeError: 'module' object has no attribute 'set_image_data_format'

Open honeywellwenjie opened this issue 6 years ago • 4 comments

sing TensorFlow backend. Traceback (most recent call last): File "keras_to_tensorflow.py", line 182, in app.run(main) File "/usr/local/lib/python2.7/dist-packages/absl/app.py", line 300, in run _run_main(main, args) File "/usr/local/lib/python2.7/dist-packages/absl/app.py", line 251, in _run_main sys.exit(main(argv)) File "keras_to_tensorflow.py", line 126, in main K.set_image_data_format('channels_last') AttributeError: 'module' object has no attribute 'set_image_data_format'

How to fix that ?

honeywellwenjie avatar Oct 15 '19 20:10 honeywellwenjie

Hello, are you Chinese,may I ask you some questions

Syxxxxx avatar Oct 16 '19 13:10 Syxxxxx

是,能说中文,我觉得可能是我版本的问题.

honeywellwenjie avatar Oct 16 '19 17:10 honeywellwenjie

我想将我的一个简单的keras模型转成tensorflow模型,出现TypeError: Expected Operation, Variable, or Tensor, got 0 的问题,很苦恼

Syxxxxx avatar Oct 17 '19 00:10 Syxxxxx

set_image_data_format is well-documented here: keras.io Which Keras version are you using? I wonder if you have not updated your Keras library for quite some time. Try updating it and test again.

amir-abdi avatar Oct 18 '19 21:10 amir-abdi