AttributeError: module ‘tensorflow.compat.v2‘ has no attribute ‘__internal__‘
AttributeError: module ‘tensorflow.compat.v2‘ has no attribute ‘internal‘如果使用keras的话,看一下keras与tensorflow或tensorflow-gpu的版本是否匹配呢。参考keras与tensorflow版本对应关系或者是由于tensorflow 1.x 与2.x 中某些包不兼容所致若是安装的2.x,而代码采取
·
如果使用keras的话,看一下keras与tensorflow或tensorflow-gpu的版本是否匹配呢。
或者是由于tensorflow 1.x 与2.x 中某些包不兼容所致
若是安装的2.x,而代码采取的1.x,则
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
更多推荐
已为社区贡献1条内容
所有评论(0)