Answers for "<module 'tensorflow._api.v2.version' from '/Users/nate/opt/anaconda3/lib/python3.8/site-packages/tensorflow/_api/v2/version/__init__.py'>"

1

AttributeError: module 'tensorflow._api.v2.train' has no attribute 'GradientDescentOptimizer'

Use version for the TensorFlow 2.x:

tf.optimizers.SGD (learning_rate=0.001, name='SGD')
Posted by: Guest on May-08-2020
1

tensorflow_core._api.v2.train' has no attribute 'GradientDescentOptimizer'

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
Posted by: Guest on March-12-2020

Code answers related to "<module 'tensorflow._api.v2.version' from '/Users/nate/opt/anaconda3/lib/python3.8/site-packages/tensorflow/_api/v2/version/__init__.py'>"

Python Answers by Framework

Browse Popular Code Answers by Language