googlecodelabs / tensorflow-for-poets-2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scripts.label_image tensorflow 2.0

MehmetCeylanV opened this issue · comments

Hi;

When i want to run label_image with tensorflow 2.0 , i am getting bellow error message. I have upgrade code by using method at https://www.tensorflow.org/alpha/guide/upgrade .

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

Help me pls. I am newbie at tensorflow and python.
Regards

Try change

import tensorflow as tf

to

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()

in the label_image.py