Skip to content
Advertisement

Tag: tensorflow2.0

Is tf.GradientTape in TF 2.0 equivalent to tf.gradients?

I am migrating my training loop to Tensorflow 2.0 API. In eager execution mode, tf.GradientTape replaces tf.gradients. The question is, do they have the same functionality? Specifically: In function gradient(): Is the parameter output_gradients equivalent to grad_ys in the old API? What about parameters colocate_gradients_with_ops. aggregation_method, gate_gradients of tf.gradients? Are they deprecated due to lack of use? Can they be

Tensorflow 2.0 – AttributeError: module ‘tensorflow’ has no attribute ‘Session’

When I am executing the command sess = tf.Session() in Tensorflow 2.0 environment, I am getting an error message as below: System Information: OS Platform and Distribution: Windows 10 Python Version: 3.7.1 Tensorflow Version: 2.0.0-alpha0 (installed with pip) Steps to reproduce: Installation: pip install –upgrade pip pip install tensorflow==2.0.0-alpha0 pip install keras pip install numpy==1.16.2 Execution: Execute command: import tensorflow

Advertisement