python3.5.2 node fc2/BatchNorm/moving_mean/read 怎么办!?
jsj05514 opened this issue · 0 comments
Caused by op 'fc2/BatchNorm/moving_mean/read', defined at:
File "Chinese_OCR.py", line 460, in
tf.app.run()
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "Chinese_OCR.py", line 444, in main
final_predict_val, final_predict_index = inference(name_list)
File "Chinese_OCR.py", line 406, in inference
graph = build_graph(top_k=3)
File "Chinese_OCR.py", line 159, in build_graph
scope='fc2')
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 182, in func_with_args
return func(*args, **current_args)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 1866, in fully_connected
outputs = normalizer_fn(outputs, **normalizer_params)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 182, in func_with_args
return func(*args, **current_args)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 597, in batch_norm
scope=scope)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 354, in _fused_batch_norm
collections=moving_mean_collections)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 182, in func_with_args
return func(*args, **current_args)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 350, in model_variable
aggregation=aggregation)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 182, in func_with_args
return func(*args, **current_args)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 277, in variable
aggregation=aggregation)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 1479, in get_variable
aggregation=aggregation)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 1220, in get_variable
aggregation=aggregation)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 530, in get_variable
return custom_getter(**custom_getter_kwargs)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 1750, in layer_variable_getter
return _model_variable_getter(getter, *args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/layers/python/layers/layers.py", line 1741, in _model_variable_getter
aggregation=aggregation)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 182, in func_with_args
return func(*args, **current_args)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 350, in model_variable
aggregation=aggregation)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 182, in func_with_args
return func(*args, **current_args)
File "/usr/local/lib/python3.5/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 277, in variable
aggregation=aggregation)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 499, in _true_getter
aggregation=aggregation)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 911, in _get_single_variable
aggregation=aggregation)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/variables.py", line 213, in call
return cls._variable_v1_call(*args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/variables.py", line 176, in _variable_v1_call
aggregation=aggregation)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/variables.py", line 155, in
previous_getter = lambda **kwargs: default_variable_creator(None, **kwargs)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/variable_scope.py", line 2495, in default_variable_creator
expected_shape=expected_shape, import_scope=import_scope)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/variables.py", line 217, in call
return super(VariableMetaclass, cls).call(*args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/variables.py", line 1395, in init
constraint=constraint)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/variables.py", line 1557, in _init_from_args
self._snapshot = array_ops.identity(self._variable, name="read")
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/util/dispatch.py", line 180, in wrapper
return target(*args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/array_ops.py", line 81, in identity
ret = gen_array_ops.identity(input, name=name)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/gen_array_ops.py", line 3890, in identity
"Identity", input=input, name=name)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
op_def=op_def)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op
op_def=op_def)
File "/usr/local/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1801, in init
self._traceback = tf_stack.extract_stack()
FailedPreconditionError (see above for traceback): Attempting to use uninitialized value fc2/BatchNorm/moving_mean
[[node fc2/BatchNorm/moving_mean/read (defined at Chinese_OCR.py:159) ]]