Retrain DashCamNet model quit with problem saying "Cannot reshape..."

Hi All,

I followed the tutorial about retraining model, downloaded the dashcamnet model, prepared my tfrecords, and started the tlt-train command. But I got error saying “ValueError: Cannot reshape a tensor with 119808 elements to shape”

The log is as below:
Traceback (most recent call last):
File “/usr/local/bin/tlt-train-g1”, line 8, in
sys.exit(main())
File “./common/magnet_train.py”, line 47, in main
File “”, line 2, in main
File “./detectnet_v2/utilities/timer.py”, line 46, in wrapped_fn
File “./detectnet_v2/scripts/train.py”, line 667, in main
File “./detectnet_v2/scripts/train.py”, line 591, in run_experiment
File “./detectnet_v2/scripts/train.py”, line 500, in train_gridbox
File “./detectnet_v2/scripts/train.py”, line 353, in build_training_graph
File “./detectnet_v2/model/detectnet_model.py”, line 515, in build_training_graph
File “./detectnet_v2/model/detectnet_model.py”, line 261, in predictions_to_dict
File “./detectnet_v2/objectives/base_objective.py”, line 97, in reshape_output
File “/usr/local/lib/python2.7/dist-packages/keras/engine/base_layer.py”, line 457, in call
output = self.call(inputs, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/keras/layers/core.py”, line 401, in call
return K.reshape(inputs, (K.shape(inputs)[0],) + self.target_shape)
File “/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py”, line 1969, in reshape
return tf.reshape(x, shape)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py”, line 7179, in reshape
“Reshape”, tensor=tensor, shape=shape, name=name)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py”, line 788, in _apply_op_helper
op_def=op_def)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.py”, line 507, in new_func
return func(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py”, line 3300, in create_op
op_def=op_def)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py”, line 1823, in init
control_input_ops)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py”, line 1662, in _create_c_op
raise ValueError(str(e))
ValueError: Cannot reshape a tensor with 119808 elements to shape [4,7,4,34,60] (228480 elements) for ‘reshape_1_1/Reshape’ (op: ‘Reshape’) with input shapes: [4,16,24,78], [5] and with input tensors computed as partial shapes: input[1] = [4,7,4,34,60].

Looks like it is a tensorflow related problem, but where to figure and fix it?

Thanks,

Hi hwang0273 ,
I am afraid this is the same topic as Error when retraining dashcamnet which is created by you.
Let’s sync in that topic. Thanks.