When running the demo.py, I got the following error message. In specific, the related error is TypeError: Input 'split_dim' of 'Split' Op has type float32 that does not match expected type of int32. I googled the error, which seems to be caused by version problem. I am using tensorflow 0.12.0-rc0.
Thank you for the advice.
2017-03-22 21:46:48,881 INFO Modules loaded successfully. Starting to build tf graph.
npy file loaded
Traceback (most recent call last):
File "/devl/tensorflow/tf_0.12/lib/python3.4/site-packages/tensorflow/python/framework/op_def_library.py", line 490, in apply_op
preferred_dtype=default_dtype)
File "/devl/tensorflow/tf_0.12/lib/python3.4/site-packages/tensorflow/python/framework/ops.py", line 669, in convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/devl/tensorflow/tf_0.12/lib/python3.4/site-packages/tensorflow/python/framework/ops.py", line 583, in _TensorTensorConversionFunction
% (dtype.name, t.dtype.name, str(t)))
ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float32: 'Tensor("ExpandDims:0", dtype=float32)'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "demo.py", line 101, in
tf.app.run()
File "/devl/tensorflow/tf_0.12/lib/python3.4/site-packages/tensorflow/python/platform/app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "demo.py", line 87, in main
prediction = core.build_inference_graph(hypes, modules,image=image)
File "/home/ug/GPU-Study/keras/FCN/fcn/tensorvision/core.py", line 137, in build_inference_graph
logits = modules['arch'].inference(hypes, image, train=False)
File "/data/dsp_emerging/ug/FCN/KittiSeg_pretrained/model_files/architecture.py", line 28, in inference
vgg_fcn.build(images, train=train, num_classes=2, random_init_fc8=True)
File "/home/ug/GPU-Study/keras/FCN/fcn/tensorflow_fcn/fcn8_vgg.py", line 60, in build
red, green, blue = tf.split(rgb, 3, 3)
File "/devl/tensorflow/tf_0.12/lib/python3.4/site-packages/tensorflow/python/ops/array_ops.py", line 1159, in split
name=name)
File "/devl/tensorflow/tf_0.12/lib/python3.4/site-packages/tensorflow/python/ops/gen_array_ops.py", line 3241, in _split
num_split=num_split, name=name)
File "/devl/tensorflow/tf_0.12/lib/python3.4/site-packages/tensorflow/python/framework/op_def_library.py", line 508, in apply_op
(prefix, dtypes.as_dtype(input_arg.type).name))
TypeError: Input 'split_dim' of 'Split' Op has type float32 that does not match expected type of int32.
Hi Marvin,
When running the demo.py, I got the following error message. In specific, the related error is
TypeError: Input 'split_dim' of 'Split' Op has type float32 that does not match expected type of int32.
I googled the error, which seems to be caused by version problem. I am usingtensorflow 0.12.0-rc0
.Thank you for the advice.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "demo.py", line 101, in
tf.app.run()
File "/devl/tensorflow/tf_0.12/lib/python3.4/site-packages/tensorflow/python/platform/app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "demo.py", line 87, in main
prediction = core.build_inference_graph(hypes, modules,image=image)
File "/home/ug/GPU-Study/keras/FCN/fcn/tensorvision/core.py", line 137, in build_inference_graph
logits = modules['arch'].inference(hypes, image, train=False)
File "/data/dsp_emerging/ug/FCN/KittiSeg_pretrained/model_files/architecture.py", line 28, in inference
vgg_fcn.build(images, train=train, num_classes=2, random_init_fc8=True)
File "/home/ug/GPU-Study/keras/FCN/fcn/tensorflow_fcn/fcn8_vgg.py", line 60, in build
red, green, blue = tf.split(rgb, 3, 3)
File "/devl/tensorflow/tf_0.12/lib/python3.4/site-packages/tensorflow/python/ops/array_ops.py", line 1159, in split
name=name)
File "/devl/tensorflow/tf_0.12/lib/python3.4/site-packages/tensorflow/python/ops/gen_array_ops.py", line 3241, in _split
num_split=num_split, name=name)
File "/devl/tensorflow/tf_0.12/lib/python3.4/site-packages/tensorflow/python/framework/op_def_library.py", line 508, in apply_op
(prefix, dtypes.as_dtype(input_arg.type).name))
TypeError: Input 'split_dim' of 'Split' Op has type float32 that does not match expected type of int32.