weitingchen83 / JSTASR-DesnowNet-ECCV-2020

This is the project page of our paper which has been published in ECCV 2020.
https://github.com/weitingchen83/JSTASR-DesnowNet-ECCV-2020
MIT License
26 stars 10 forks source link

ValueError: A `Concatenate` layer should be called on a list of at least 1 input. Received: input_shape=[[(None, 480, 640, 1)], (None, 480, 640, 3)] #4

Open Resham-Sundar opened 2 years ago

Resham-Sundar commented 2 years ago

Command - python predict.py -dataroot testImg -datatype tif -predictpath output -batch_size 3

import end Read img from: testImg Len of the file: 3 [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||] 100.0% ...Loading data... (3, 480, 640, 3) data shape 2022-01-25 10:51:29.790963: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0. Build TR Traceback (most recent call last): File "predict.py", line 95, in modelRecoverCombine = model.model.build_combine_model() File "/content/JSTASR-DesnowNet-ECCV-2020/model/model.py", line 181, in build_combine_model TRinp=Concatenate(axis=3)([pmrc,inp]) File "/usr/local/lib/python3.7/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler raise e.with_traceback(filtered_tb) from None File "/usr/local/lib/python3.7/dist-packages/keras/layers/merge.py", line 499, in build 'A Concatenate layer should be called on a list of ' ValueError: A Concatenate layer should be called on a list of at least 1 input. Received: input_shape=[[(None, 480, 640, 1)], (None, 480, 640, 3)]

Facing this issue when trying to use the pretrained model and running predict.py

nasir-azeemi commented 2 years ago

same issue

Trevor-Philips-cbd commented 2 years ago

I have same issue.

rashrosha commented 2 years ago

I have the same issue, any one find a solution please?!

rashrosha commented 2 years ago

Command - python predict.py -dataroot testImg -datatype tif -predictpath output -batch_size 3

import end Read img from: testImg Len of the file: 3 [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||] 100.0% ...Loading data... (3, 480, 640, 3) data shape 2022-01-25 10:51:29.790963: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0. Build TR Traceback (most recent call last): File "predict.py", line 95, in modelRecoverCombine = model.model.build_combine_model() File "/content/JSTASR-DesnowNet-ECCV-2020/model/model.py", line 181, in build_combine_model TRinp=Concatenate(axis=3)([pmrc,inp]) File "/usr/local/lib/python3.7/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler raise e.with_traceback(filtered_tb) from None File "/usr/local/lib/python3.7/dist-packages/keras/layers/merge.py", line 499, in build 'A Concatenate layer should be called on a list of ' ValueError: A Concatenate layer should be called on a list of at least 1 input. Received: input_shape=[[(None, 480, 640, 1)], (None, 480, 640, 3)]

Facing this issue when trying to use the pretrained model and running predict.py

please do you find a solution ?

AmirMz1 commented 1 year ago

in model/model.py

in build_combine_model function find this line: TRinp=Concatenate(axis=3)([pmrc,inp]) and change it to: TRinp=Concatenate(axis=3)([pmrc[0],inp])