tensorflow2兼容tensorflow1

替换代码:

import tensorflow as tf

修改为:

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
posted @ 2020-11-20 16:56  wioponsen  阅读(714)  评论(0编辑  收藏  举报