srihari-humbarwadi / DeepLabV3_Plus-Tensorflow2.0

DeepLabV3+ implemented in TensorFlow2.0
https://arxiv.org/pdf/1802.02611.pdf
168 stars 45 forks source link

Train on cityscapes. A `Concatenate` layer requires inputs with matching shapes except for the concat axis #11

Closed mrengineer closed 5 years ago

mrengineer commented 5 years ago

I am trying to train cityscapes. But I have messages hereunder. Pls help

Traceback (most recent call last): File "train.py", line 115, in model = DeepLabV3Plus(H, W, num_classes) File "/home/bulkin/tensorflow/DeepLabV3_Plus-Tensorflow2.0/deeplab.py", line 70, in DeepLabV3Plus x_a = ASPP(image_features) File "/home/bulkin/tensorflow/DeepLabV3_Plus-Tensorflow2.0/deeplab.py", line 54, in ASPP y = concatenate([y_pool, y_1, y_6, y_12, y_18], name='ASPP_concat') File "/home/bulkin/.local/lib/python3.6/site-packages/tensorflow/python/keras/layers/merge.py", line 687, in concatenate return Concatenate(axis=axis, **kwargs)(inputs) File "/home/bulkin/.local/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 616, in call self._maybe_build(inputs)

File "/home/bulkin/.local/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 1966, in _maybe_build self.build(input_shapes) File "/home/bulkin/.local/lib/python3.6/site-packages/tensorflow/python/keras/utils/tf_utils.py", line 296, in wrapper output_shape = fn(instance, input_shape) File "/home/bulkin/.local/lib/python3.6/site-packages/tensorflow/python/keras/layers/merge.py", line 391, in build 'Got inputs shapes: %s' % (input_shape)) ValueError: A Concatenate layer requires inputs with matching shapes except for the concat axis. Got inputs shapes: [(None, 32, 32, 256), (None, 32, 32, 256), (None, None, None, 256), (None, None, None, 256), (None, None, None, 256)]

srihari-humbarwadi commented 5 years ago

Can you post the tensorflow version you are currently using?

mrengineer commented 5 years ago

Tensorflow 2.0.0-beta1 python 3.6

BTW, why dont you make docker image?

UPD: downgraded to TensorFlow 2.0.0-alpha0 and train is started.

UPD2: cuddn 7.6.3, cuda 10, TF 2.0.0 alpha0. Nvidia 1080TI. Train start, but not enough memory

mrengineer commented 5 years ago

Train is started with bath = 6

srihari-humbarwadi commented 5 years ago

@mrengineer Tensorflow 2.0.0-rc0 will also work