tensorflow_tutorials icon indicating copy to clipboard operation
tensorflow_tutorials copied to clipboard

06-modern-convnet "ValueError: None values not supported"

Open yyw16 opened this issue 8 years ago • 2 comments

hello~ when I'm running 06-modern-convnet with tensorflow 1.4, it presents an error. Could you please tell me how to solve it? My friends also have this prolbem. Traceback (most recent call last): File "C:/zwPython/py_demo/tf_demo/06_modern_convnet.py", line 35, in is_training, scope='bn1'), name='lrelu1') File "C:\zwPython\py_demo\tf_demo\libs\batch_norm.py", line 58, in batch_norm lambda: (ema_mean, ema_var)) File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\util\deprecation.py", line 316, in new_func return func(*args, **kwargs) File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 1864, in cond orig_res_f, res_f = context_f.BuildCondBranch(false_fn) File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 1729, in BuildCondBranch result = nest.map_structure(self._BuildCondTensor, original_result) File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\util\nest.py", line 413, in map_structure structure[0], [func(*x) for x in entries]) File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\util\nest.py", line 413, in structure[0], [func(*x) for x in entries]) File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 1721, in _BuildCondTensor return self._ProcessOutputTensor(ops.convert_to_tensor(v)) File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 836, in convert_to_tensor as_ref=False) File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 926, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\framework\constant_op.py", line 229, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\framework\constant_op.py", line 208, in constant value, dtype=dtype, shape=shape, verify_shape=verify_shape)) File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 371, in make_tensor_proto raise ValueError("None values not supported.") ValueError: None values not supported.

yyw16 avatar Feb 24 '18 12:02 yyw16

Did u solved this issue?

Pezzan avatar Jun 29 '18 18:06 Pezzan

I have read the source code of tf.train.ExponentialMovingAverage there should have a line of code:

ema.apply([batch_mean, batch_var])

before calculating batch_mean and batch_var and that works for me

xionchen avatar Oct 19 '18 02:10 xionchen