cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
341 Views
Registered: ‎08-02-2019

"Beta input to batch norm has bad shape" Error while running DECENT

Hi,

I am using resnet50 keras model and when I run it using decent_q.sh I get the following error:

INFO: Checking Float Graph...
['activation_49/Relu']
INFO: Float Graph Check Done.
Traceback (most recent call last):
File "/home/tcs/miniconda3/envs/decent/bin/decent_q", line 10, in <module>
sys.exit(run_main())
File "/home/tcs/miniconda3/envs/decent/lib/python2.7/site-packages/tensorflow/contrib/decent_q/python/decent_q.py", line 540, in run_main
app.run(main=my_main, argv=[sys.argv[0]] + unparsed)
File "/home/tcs/miniconda3/envs/decent/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/home/tcs/miniconda3/envs/decent/lib/python2.7/site-packages/tensorflow/contrib/decent_q/python/decent_q.py", line 539, in <lambda>
my_main = lambda unused_args: main(unused_args, FLAGS)
File "/home/tcs/miniconda3/envs/decent/lib/python2.7/site-packages/tensorflow/contrib/decent_q/python/decent_q.py", line 335, in main
quantize_frozen(input_graph_def, input_fn, q_config, s_config, flags.skip_check)
File "/home/tcs/miniconda3/envs/decent/lib/python2.7/site-packages/tensorflow/contrib/decent_q/python/decent_q.py", line 225, in quantize_frozen
q_config, s_config)
File "/home/tcs/miniconda3/envs/decent/lib/python2.7/site-packages/tensorflow/contrib/decent_q/python/decent_q.py", line 156, in calibrate_frozen
calib_graph_def = CreateQuantizeCalibrationGraphDef(input_graph_def, q_config)
File "/home/tcs/miniconda3/envs/decent/lib/python2.7/site-packages/tensorflow/contrib/decent_q/python/quantize_graph.py", line 169, in CreateQuantizeCalibrationGraphDef
input_graph_def_string, config.to_string(), status)
File "/home/tcs/miniconda3/envs/decent/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 528, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Beta input to batch norm has bad shape: [64]

The model runs perfectly in normal tensorflow 1.12 environment but it's throwing this error when I run in DNNDK-v3.1.

Please help me resolve this error!

0 Kudos
1 Reply
Highlighted
Observer
Observer
238 Views
Registered: ‎09-11-2018

Re: "Beta input to batch norm has bad shape" Error while running DECENT

0 Kudos