kitti_multiloss.py generates ValueError: inputs must be a list of at least one Tensor with the same dtype and shape
See original GitHub issueHi Marvin,
I have gotten the the demo.py running successfully, and now I am trying to experimenting with train.py. However, I got the following error message
File “/home/ decoder/kitti_multiloss.py”, line 86, in loss name=‘reg_loss’) File “/devl /tensorflow/tf/lib/python3.4/site-packages/tensorflow/python/ops/math_ops.py”, line 1827, in add_n raise ValueError("inputs must be a list of at least one Tensor with the " ValueError: inputs must be a list of at least one Tensor with the same dtype and shape
It is caused by reg_loss_col = tf.GraphKeys.REGULARIZATION_LOSSES weight_loss = tf.add_n(tf.get_collection(reg_loss_col),name='reg_loss') in kitti_multiloss.py Are there any ways to print out the information of tf.get_collection(reg_loss_col) to figure out why the error was generated.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)

Top Related StackOverflow Question
My suggestion should fix this. So I will close this for now.
While importing a new encoder into the project I encountered the same error. Registering a batch norm to REGULARIZATION_LOSSES collection resolved my issue.
self.conv_1_batch_norm = slim.batch_norm(self.conv_1, scope='conv_1/batch_norm') tf.add_to_collection(tf.GraphKeys.REGULARIZATION_LOSSES, self.conv_1_batch_norm)