菜鸟记录,大佬跳过
需要进行如下修改
import tensorflow as tf
#改为
import tensorflow.compat.v1 as tf
from tensorflow.train import AdamOptimizer as Adam
#改为
from tensorflow.compat.v1.train import AdamOptimizer as Adam
在有提示的语句中都加入上述语句就可以。
菜鸟记录,大佬跳过
需要进行如下修改
import tensorflow as tf
#改为
import tensorflow.compat.v1 as tf
from tensorflow.train import AdamOptimizer as Adam
#改为
from tensorflow.compat.v1.train import AdamOptimizer as Adam
在有提示的语句中都加入上述语句就可以。