当我运行https://github.com/MG2033/ShuffleNet上编写的代码时,仅通过运行python main.py --config config/test.json
,在“填充”模型时会收到以下错误:
Building the model...
Traceback (most recent call last):
File "main.py", line 69, in <module>
main()
File "main.py", line 35, in main
model = ShuffleNet(config_args)
File "/home/farzaneh/PycharmProjects/shufflenet code/ShuffleNet-master/model.py", line 29, in __init__
self.__build()
File "/home/farzaneh/PycharmProjects/shufflenet code/ShuffleNet-master/
model.py", line 134, in __build
self.__init_output()
File "/home/farzaneh/PycharmProjects/shufflenet code/ShuffleNet-master /model.py", line 91, in __init_output
self.check_op = tf.add_check_numerics_ops()
File "/home/farzaneh/anaconda3/lib/python3.6/site-packages/tensorflow /python/ops/numerics.py", line 75, in add_check_numerics_ops
raise ValueError("`tf.add_check_numerics_ops() is not compatible "
ValueError: `tf.add_check_numerics_ops() is not compatible with TensorFlow control flow operations such as `tf.cond()` or `tf.while_loop()`.
我该如何解决?