-
Notifications
You must be signed in to change notification settings - Fork 4
Description
While i try to run this line of code, i keep getting this error:
Tensorflow version 1.4.1
Keras 2.1.3
python -m im2txt.run_inference --input_files test.jpg
WARNING:tensorflow:VARIABLES collection name is deprecated, please use GLOBAL_VARIABLES instead; VARIABLES will be removed after 2017-03-02.
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/kirthana/kirthana/im2txt_api/im2txt/run_inference.py", line 159, in
tf.app.run()
File "/home/kirthana/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "/home/kirthana/kirthana/im2txt_api/im2txt/run_inference.py", line 49, in main
FLAGS.checkpoint_path)
File "im2txt/inference_utils/inference_wrapper_base.py", line 115, in build_graph_from_config
self.build_model(model_config)
File "im2txt/inference_wrapper.py", line 36, in build_model
model.build()
File "im2txt/show_and_tell_model.py", line 355, in build
self.build_model()
File "im2txt/show_and_tell_model.py", line 267, in build_model
tf.concat(1, initial_state, name="initial_state")
File "/home/kirthana/.local/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1096, in concat
dtype=dtypes.int32).get_shape().assert_is_compatible_with(
File "/home/kirthana/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 836, in convert_to_tensor
as_ref=False)
File "/home/kirthana/.local/lib/python2.7/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 "/home/kirthana/.local/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 229, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/home/kirthana/.local/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 208, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/home/kirthana/.local/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 383, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/home/kirthana/.local/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 303, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.