async-rl icon indicating copy to clipboard operation
async-rl copied to clipboard

FailedPreconditionError

Open ihungalexhsu opened this issue 8 years ago • 4 comments

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!

ihungalexhsu avatar Jan 09 '17 07:01 ihungalexhsu

I met the same problem here

yuke93 avatar Jan 19 '17 02:01 yuke93

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

adi-sharma avatar Jan 21 '17 00:01 adi-sharma

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.

jtheak avatar Feb 02 '17 01:02 jtheak

@jtheak it works for me. thanks

tigerneil avatar Feb 08 '17 09:02 tigerneil