AttributeError: module 'tensorflow._api.v2.train' has no attribute 'AdamOptimizer' site:stackoverflow.com code example
Example: AttributeError: module 'tensorflow._api.v2.train' has no attribute 'RMSPropOptimizer' site:stackoverflow.com
change
tf.train.Optimizer
to
tf.compat.v1.train.Optimizer