天天看点

AttributeError: module‘ tensorflow_core._api.v2. train‘ has no attribute‘ AdamOptimizer‘

【Bug提示】:AttributeError: module’ tensorflow_core._api.v2. train’ has no attribute’ AdamOptimizer’

【Bug定位】:

AttributeError: module‘ tensorflow_core._api.v2. train‘ has no attribute‘ AdamOptimizer‘

【改正方法】:

AttributeError: module‘ tensorflow_core._api.v2. train‘ has no attribute‘ AdamOptimizer‘

此外,在程序开始部分加上tf.compat.v1.disable_eager_execution()

继续阅读