Discussions>The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()>

The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

I'm getting this when I want to initialize network's variable

uninitialized_variables = sess.run(tf.report_uninitialized_variables())
sess.run(tf.variables_initializer(uninitialized_variables))

Is there any idea for this?

2 votesLP216.00
1 Answers
NN170.00
1

In your variables list, there can be dupplicatesreport_uninitialized_variables  returns variable names only (sometimes with "dupplicates"), you will have to get the varibales by these names, then pass it to variables_initializer function. 

Reply
Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?