TENSOR flow execution locally

Hi,

I have tensorflow version- (in my local device)

import tensorflow
print(tensorflow.version)

2.0.0

but I am getting this error while executing reset default graph. please help me sir

AttributeError: module ‘tensorflow’ has no attribute ‘reset_default_graph’

AttributeError: module ‘tensorflow’ has no attribute ‘Session’

AttributeError: module ‘tensorflow’ has no attribute ‘global_variables_initializer’

I have used these below steps but didn’t work
https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/

please help me sir its urgent i am unable to proceed further

Hi, Queen.

You are using the tensorflow 2.0.0 version but you are running the commands for tensorflow 1.1 .

You need to explore on what are the corresponding packages or functions in tensorflow 2 as it is slightly changed.

Then you will be able to do it.

Kindly refer to the documentations

https://www.tensorflow.org/api_docs/python/tf/compat/v1/Session
https://www.tensorflow.org/api_docs/python/tf/compat/v1/global_variables_initializer
https://www.tensorflow.org/api_docs/python/tf/compat/v1/reset_default_graph
https://www.tensorflow.org/api_docs/python/
https://github.com/tensorflow/tensorflow/blob/v2.2.0/tensorflow/python/framework/ops.py#L5780-L5797

All the best!

Sir I am editing 1 attribute then there is error for the other it is very difficult to correct each and every code this way it is consuming a lot of time.
So sir please help me to resolve these errors please it is important as i have to do the final year project from 1st july and also i am unable to proceed with the course further.

errors :RuntimeError: tf.summary.FileWriter is not compatible with eager execution. Use tf.contrib.summary instead.
to solve the above error i have added ** **tf.compat.v1.disable_eager_execution()** ** now it is not showing nontype attribute run but , but eval is still not supported

RuntimeError: The Session graph is empty. Add operations to the graph before calling run().

AttributeError: ‘NoneType’ object has no attribute 'run’

AttributeError: Tensor.graph is meaningless when eager execution is enabled.
NotImplementedError: eval is not supported when eager execution is enabled, is .numpy() what you’re looking for?

NotImplementedError: eval is not supported when eager execution is enabled, is .numpy() what you’re looking for?

RuntimeError: tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead.






for housing dataset it is not showing the graph

Hi, Queen.

  1. I can see that you are doing in your local system.
  2. Which project you are doing?.
  3. To avoid these error you have to know the Tensorflow_2 syntax.
    or you can do it in Tensorflow_1.
    Here are some resources that can help.
    https://cs224d.stanford.edu/lectures/CS224d-Lecture7.pdf

All the best!

If we do locally then how we will run the tensor board like what will be the url for running tensorboard locally??

You can refer to this for running tensorboard in CloudxLab environment :- [SOLVED] Cannot start Tensorboard Server

For running locally there is a different procedure, you need to download the packages in Jupyter environment and run it in your local host.

All the best!

Okay can you please specify which package to download or how to download tensorboard in windows10 i am unable to do it???
Thank you

Hi, Queen.

Kindly refer to the below

https://www.tensorflow.org/tensorboard/graphs

All the best!