Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Jan 25, 2022 · 5 comments

Comments

@Resham-Sundar
Copy link

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
Copy link

same issue

@Trevor-Philips-cbd
Copy link

I have same issue.

@rashrosha
Copy link

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

@rashrosha
Copy link

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
Copy link

AmirMz1 commented May 2, 2023

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])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants