ValueError: Variable ### does not exist, or was not created with tf.get_variable().

問題:
ValueError: Variable global_graph/conv__1/bn/tower_1/global_graph/conv__1/bn/moments/Squeeze/ExponentialMovingAverage/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=tf.AUTO_REUSE in VarScope?

代碼:
with tf.variable_scope(‘scope’) as sc:
batch_size = points.get_shape()[0].value
num_point = points.get_shape()[1].value
修改後:
with tf.variable_scope(‘scope’,reuse=tf.AUTO_REUSE) as sc:
batch_size = points.get_shape()[0].value
num_point = points.get_shape()[1].value

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章