Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FailedPreconditionError #16

Open
ihungalexhsu opened this issue Jan 9, 2017 · 4 comments
Open

FailedPreconditionError #16

ihungalexhsu opened this issue Jan 9, 2017 · 4 comments

Comments

@ihungalexhsu
Copy link

Excuse me, as I execute your program, I've got an error in tensorflow initialize:
Attempting to use uninitialized value convolution2d_1_W
[[Node: convolution2d_1_W/read = IdentityT=DT_FLOAT, _class=["loc:@convolution2d_1_W"], _device="/job:localhost/replica:0/task:0/cpu:0"]]

How can I slove it?
Thx!

@yuke93
Copy link

yuke93 commented Jan 19, 2017

I met the same problem here

@adi-sharma
Copy link

I tried the whole procedure exactly as given, on two different machines just to be sure. It gives this error every time. Am I doing something wrong? Adding a screen shot.

Here
screenshot from 2017-01-21 05-57-30

@jtheak
Copy link

jtheak commented Feb 2, 2017

I had the same issue, it's to do with how you initialize your variables, which I think must have changed in tensorflow after this was written.

I fixed it in the following steps

  1. Deprecated tensorflow function tf.initialize_all_variables() was used and came too late, changed to tf.global_variables_initializer() and moved to line 234
  2. After this when I tried to run I got a RunTime error because the Tensorflow session not correctly initialised.
    To fix this I changed the first couple lines in main(_) function from
    g = tf.Graph()
    with g.as_default(), tf.Session() as session:
    to
    g = tf.Graph()
    session = tf.Session(graph=g)
    with g.as_default(), session.as_default():

Someone will know more than me and be able to confirm this but I think this means that when 'session' is passed to the functions it is not default unless it has been set as the default session so session.run cannot find the initialized session.

@tigerneil
Copy link

@jtheak it works for me. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants