cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
185 Views
Registered: ‎11-24-2019

ValueError:incompatible with expected float

I am trying to quantize yolov3 model and get an error. three is a aimilar thread corresponding to my error:https://forums.xilinx.com/t5/Machine-Learning/incompatible-with-expected-float/m-p/994439

I specified the input size: input_data = tf.placeholder(dtype=tf.float32, shape=[None, img_size, img_size, num_channels], name='input_data')

but it doesn't work. I just wonder how to solve the problem.

Here is the error message:

['pred_multi_scale/concat', 'pred_sbbox/concat_2', 'pred_mbbox/concat_2', 'pred_lbbox/concat_2']
INFO: Checking Float Graph...
INFO: Float Graph Check Done.
2019-12-03 10:17:15.309844: W tensorflow/contrib/decent_q/utils/graph_quantizer.cc:93] Found node with non-quantizable T: pred_sbbox/concat (op: ConcatV2, T: 3)
2019-12-03 10:17:15.309985: W tensorflow/contrib/decent_q/utils/graph_quantizer.cc:93] Found node with non-quantizable T: pred_mbbox/concat (op: ConcatV2, T: 3)
2019-12-03 10:17:15.310062: W tensorflow/contrib/decent_q/utils/graph_quantizer.cc:93] Found node with non-quantizable T: pred_lbbox/concat (op: ConcatV2, T: 3)
2019-12-03 10:17:15.366278: W tensorflow/contrib/decent_q/utils/graph_quantizer.cc:93] Found node with non-quantizable T: pred_sbbox/concat (op: ConcatV2, T: 3)
2019-12-03 10:17:15.366357: W tensorflow/contrib/decent_q/utils/graph_quantizer.cc:93] Found node with non-quantizable T: pred_mbbox/concat (op: ConcatV2, T: 3)
2019-12-03 10:17:15.366408: W tensorflow/contrib/decent_q/utils/graph_quantizer.cc:93] Found node with non-quantizable T: pred_lbbox/concat (op: ConcatV2, T: 3)
2019-12-03 10:17:15.417061: W tensorflow/contrib/decent_q/utils/graph_quantizer.cc:93] Found node with non-quantizable T: pred_sbbox/concat (op: ConcatV2, T: 3)
2019-12-03 10:17:15.417141: W tensorflow/contrib/decent_q/utils/graph_quantizer.cc:93] Found node with non-quantizable T: pred_mbbox/concat (op: ConcatV2, T: 3)
2019-12-03 10:17:15.417192: W tensorflow/contrib/decent_q/utils/graph_quantizer.cc:93] Found node with non-quantizable T: pred_lbbox/concat (op: ConcatV2, T: 3)
Traceback (most recent call last):
File "/home/howe/.conda/envs/decent/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 418, in import_graph_def
graph._c_graph, serialized, options) # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input 0 of node pred_sbbox/strided_slice_8/aquant was passed int32 from pred_sbbox/strided_slice_8:0 incompatible with expected float.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/howe/.conda/envs/decent/bin/decent_q", line 8, in <module>
sys.exit(run_main())
File "/home/howe/.conda/envs/decent/lib/python3.6/site-packages/tensorflow/contrib/decent_q/python/decent_q.py", line 541, in run_main
app.run(main=my_main, argv=[sys.argv[0]] + unparsed)
File "/home/howe/.conda/envs/decent/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/home/howe/.conda/envs/decent/lib/python3.6/site-packages/tensorflow/contrib/decent_q/python/decent_q.py", line 540, in <lambda>
my_main = lambda unused_args: main(unused_args, FLAGS)
File "/home/howe/.conda/envs/decent/lib/python3.6/site-packages/tensorflow/contrib/decent_q/python/decent_q.py", line 336, in main
quantize_frozen(input_graph_def, input_fn, q_config, s_config, flags.skip_check)
File "/home/howe/.conda/envs/decent/lib/python3.6/site-packages/tensorflow/contrib/decent_q/python/decent_q.py", line 226, in quantize_frozen
q_config, s_config)
File "/home/howe/.conda/envs/decent/lib/python3.6/site-packages/tensorflow/contrib/decent_q/python/decent_q.py", line 160, in calibrate_frozen
tf.import_graph_def(calib_graph_def, name='')
File "/home/howe/.conda/envs/decent/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 488, in new_func
return func(*args, **kwargs)
File "/home/howe/.conda/envs/decent/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 422, in import_graph_def
raise ValueError(str(e))
ValueError: Input 0 of node pred_sbbox/strided_slice_8/aquant was passed int32 from pred_sbbox/strided_slice_8:0 incompatible with expected float.

0 Kudos