解决:tensorflow have no attribute

2021-01-27  本文已影响0人  Yuri7

具体写法根据tensorflow的版本而定


# tensorflow >= 1.5
tf.compat.v1.enable_eager_execution() 
 
# tensorflow >= 1.4 <2.0
tf.enable_eager_execution() 
 
# tensorflow >= 2.0
以上都免了,也可以使用第一个
上一篇下一篇

猜你喜欢

热点阅读