0

Why is this happening? Error message - Attempting to uninitialized Variable Error here is my source: source - Learning .JPG Image in computer using tensorflow

I don't know why this error occur... I already used two types of variable initialization function:

  1. tf.global_variables_initializer()
  2. tf.local_variables_initializer()
1
  • 1
    Don't post code as an image! Commented Feb 1, 2018 at 11:57

1 Answer 1

1

You should use tf.global_variables_initializer() and invoke it after you defined all the variables, not before. The simplest thing would be to do simply:

with tf.Session() as sess:
  sess.run(tf.global_variables_initializer())
  ...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.