You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, is it possible to train the model on a grayscale dataset without transforming it to rgb? I tried the example code with c_dim=1 in the RRDN model but I have an error with the dimensions of the next layers:
WARNING:tensorflow:Model was constructed with shape (None, 80, 80, 3) for input KerasTensor(type_spec=TensorSpec(shape=(None, 80, 80, 3), dtype=tf.float32, name='input_2'), name='input_2', description="created by layer 'input_2'"), but it was called on an input with incompatible shape (None, 80, 80, 1).
Traceback (most recent call last):
File "/home/dolabok/Documents/[...]/super_resolution.py", line 76, in
trainer = Trainer(
File "/home/dolabok/anaconda3/lib/python3.9/site-packages/ISR-2.2.0-py3.9.egg/ISR/train/trainer.py", line 105, in init
File "/home/dolabok/anaconda3/lib/python3.9/site-packages/ISR-2.2.0-py3.9.egg/ISR/train/trainer.py", line 185, in _combine_networks
File "/home/dolabok/anaconda3/lib/python3.9/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/dolabok/anaconda3/lib/python3.9/site-packages/keras/engine/input_spec.py", line 277, in assert_input_compatibility
raise ValueError(
ValueError: Exception encountered when calling layer "discriminator" (type Functional).
Input 0 of layer "Conv_1" is incompatible with the layer: expected axis -1 of input shape to have value 3, but received input with shape (None, 80, 80, 1)
Call arguments received by layer "discriminator" (type Functional):
• inputs=tf.Tensor(shape=(None, 80, 80, 1), dtype=float32)
• training=False
• mask=None
it seems that the discriminator is hard-coded with channel = 3
Hi, is it possible to train the model on a grayscale dataset without transforming it to rgb? I tried the example code with c_dim=1 in the RRDN model but I have an error with the dimensions of the next layers:
WARNING:tensorflow:Model was constructed with shape (None, 80, 80, 3) for input KerasTensor(type_spec=TensorSpec(shape=(None, 80, 80, 3), dtype=tf.float32, name='input_2'), name='input_2', description="created by layer 'input_2'"), but it was called on an input with incompatible shape (None, 80, 80, 1).
Traceback (most recent call last):
File "/home/dolabok/Documents/[...]/super_resolution.py", line 76, in
trainer = Trainer(
File "/home/dolabok/anaconda3/lib/python3.9/site-packages/ISR-2.2.0-py3.9.egg/ISR/train/trainer.py", line 105, in init
File "/home/dolabok/anaconda3/lib/python3.9/site-packages/ISR-2.2.0-py3.9.egg/ISR/train/trainer.py", line 185, in _combine_networks
File "/home/dolabok/anaconda3/lib/python3.9/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/dolabok/anaconda3/lib/python3.9/site-packages/keras/engine/input_spec.py", line 277, in assert_input_compatibility
raise ValueError(
ValueError: Exception encountered when calling layer "discriminator" (type Functional).
Input 0 of layer "Conv_1" is incompatible with the layer: expected axis -1 of input shape to have value 3, but received input with shape (None, 80, 80, 1)
Call arguments received by layer "discriminator" (type Functional):
• inputs=tf.Tensor(shape=(None, 80, 80, 1), dtype=float32)
• training=False
• mask=None
it seems that the discriminator is hard-coded with channel = 3
My code :
The text was updated successfully, but these errors were encountered: