tensorflow exception from session initializing one variable? -


i getting exception tensorflow example code:

import tensorflow tf  x = tf.variable(tf.random_normal([2,2], stddev=0.35)) init_op = tf.initialize_all_variables() sess = tf.session(init_op) 

it gives

unboundlocalerror: local variable 'opts' referenced before assignment

is bug, or doing wrong? maybe example simple , tensorflow expected more computations set up?

i think error in code, that's unhelpful error message tf.session constructor.

the correct way initialize variable is:

sess = tf.session()  # note no argument. sess.run(init_op) 

Comments

Popular posts from this blog

ios - UITEXTFIELD InputView Uipicker not working in swift -

Hatching array of circles in AutoCAD using c# -