AttributeError: module 'tensorflow._api.v2.train' has no attribute 'RMSPropOptimizer' site:stackoverflow.com code example
Example 1: AttributeError: module 'tensorflow._api.v2.train' has no attribute 'GradientDescentOptimizer' site:stackoverflow.com
use tf.optimizer.SGD() for tensorflow2.0
Example 2: AttributeError: module 'tensorflow._api.v2.train' has no attribute 'RMSPropOptimizer' site:stackoverflow.com
change
tf.train.Optimizer
to
tf.compat.v1.train.Optimizer