Closed Thrasi closed 8 years ago
I run: python test_fcn16_vgg.py
python test_fcn16_vgg.py
And get: Traceback (most recent call last): File "test_fcn16_vgg.py", line 36, in <module> vgg_fcn.build(batch_images, debug=True) File "/home/***/misc/tensorflow-fcn/fcn16_vgg.py", line 125, in build self.fuse_pool4 = tf.add(self.upscore2, self.score_pool4) ... ValueError: Incompatible shapes for broadcasting: (?, ?, ?, 2) and (?, ?, ?, 20)
Traceback (most recent call last): File "test_fcn16_vgg.py", line 36, in <module> vgg_fcn.build(batch_images, debug=True) File "/home/***/misc/tensorflow-fcn/fcn16_vgg.py", line 125, in build self.fuse_pool4 = tf.add(self.upscore2, self.score_pool4) ... ValueError: Incompatible shapes for broadcasting: (?, ?, ?, 2) and (?, ?, ?, 20)
Examination of _upscore_layer for the three network architectures shows that the function in fcn16_vgg.py includes a line at 237:
deconv.set_shape([None, None, None, 2])
which is hard coded for 2 classes. This line should be removed I assume. The code runs after I remove it.
You are right. This line was absolutely unnecessary. There is no need to set the shape of deconv at all. No idea how it got there. Thx
I run:
python test_fcn16_vgg.py
And get:
Traceback (most recent call last): File "test_fcn16_vgg.py", line 36, in <module> vgg_fcn.build(batch_images, debug=True) File "/home/***/misc/tensorflow-fcn/fcn16_vgg.py", line 125, in build self.fuse_pool4 = tf.add(self.upscore2, self.score_pool4) ... ValueError: Incompatible shapes for broadcasting: (?, ?, ?, 2) and (?, ?, ?, 20)
Examination of _upscore_layer for the three network architectures shows that the function in fcn16_vgg.py includes a line at 237:
deconv.set_shape([None, None, None, 2])
which is hard coded for 2 classes. This line should be removed I assume. The code runs after I remove it.