-
Notifications
You must be signed in to change notification settings - Fork 24
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
One Channel Brain MRI Dataset #13
Comments
Dear fitriaurbach0014,
I am sorry, but this is not related to my code.
Once you change it, you should find out your own errors. Problem-solving is
also part of the job.
Anyway I find the warning quite clear: Model was constructed with shape
(None, 128, 128, 128, 1) for input
KerasTensor(type_spec=TensorSpec(shape=(None, 128, 128, 128, 1),
dtype=tf.float32, name='input_image'), name='input_image',
description="created by layer 'input_image'"), but it was called on an
input with incompatible shape (4, 128, 128, 128, 2).
Your input layer was created to receive images with one channel, but you
are feeding it with images with 2 channels.
Best regards,
Marco Domenico Cirillo
Il giorno ven 15 apr 2022 alle ore 05:27 fitriaurbach0014 <
***@***.***> ha scritto:
… Hello Sir
Actually, I tried Vox2Vox for my brain MRI dataset which has only one
channel. I've already changed the number of channels, but I got this error.
I am still confused, how could it be? Thank you, sir.
WARNING:tensorflow:Model was constructed with shape (None, 128, 128, 128,
10) for input KerasTensor(type_spec=TensorSpec(shape=(None, 128, 128, 128,
10), dtype=tf.float32, name='target_image'), name='target_image',
description="created by layer 'target_image'"), but it was called on an
input with incompatible shape (4, 128, 128, 128, 1).
WARNING:tensorflow:Model was constructed with shape (None, 128, 128, 128,
1) for input KerasTensor(type_spec=TensorSpec(shape=(None, 128, 128, 128,
1), dtype=tf.float32, name='input_image'), name='input_image',
description="created by layer 'input_image'"), but it was called on an
input with incompatible shape (4, 128, 128, 128, 2).
Traceback (most recent call last):
File "/content/drive/MyDrive/Fitria/vox2vox_satu sequence/main.py", line
76, in
h = fit(train_gen, valid_gen, alpha, n_epochs)
File "/content/drive/MyDrive/Fitria/vox2vox_satu sequence/train_v2v.py",
line 75, in fit
losses = train_step(Xb, yb, alpha)
File
"/usr/local/lib/python3.7/dist-packages/tensorflow/python/util/traceback_utils.py",
line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File
"/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/func_graph.py",
line 1147, in autograph_handler
raise e.ag_error_metadata.to_exception(e)
ValueError: in user code:
File "/content/drive/MyDrive/Fitria/vox2vox_satu sequence/train_v2v.py", line 27, in train_step *
disc_real_output = D([image, target], training=True)
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/engine/input_spec.py", line 249, in assert_input_compatibility
f'Input {input_index} of layer "{layer_name}" is '
ValueError: Exception encountered when calling layer "Discriminator" (type Functional).
Input 0 of layer "conv3d_8" is incompatible with the layer: expected axis -1 of input shape to have value 11, but received input with shape (4, 128, 128, 128, 3)
Call arguments received:
• inputs=['tf.Tensor(shape=(4, 128, 128, 128, 1), dtype=float64)', 'tf.Tensor(shape=(4, 128, 128, 128, 2), dtype=float32)']
• training=True
• mask=None
—
Reply to this email directly, view it on GitHub
<#13>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOJQHCBSJA5TGRIALTWD4OTVFDO3TANCNFSM5TPOW2NQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello Sir
Actually, I tried Vox2Vox for my brain MRI dataset which has only one channel. I've already changed the number of channels, but I always got this error. I am still confused, how could it be? Thank you, sir.
Epoch 1/200
WARNING:tensorflow:Model was constructed with shape (None, 128, 128, 128, 1) for input KerasTensor(type_spec=TensorSpec(shape=(None, 128, 128, 128, 1), dtype=tf.float32, name='input_image'), name='input_image', description="created by layer 'input_image'"), but it was called on an input with incompatible shape (4, 128, 128, 128, 2).
Traceback (most recent call last):
File "/content/drive/MyDrive/Fitria/vox2vox_satu sequence/main.py", line 76, in
h = fit(train_gen, valid_gen, alpha, n_epochs)
File "/content/drive/MyDrive/Fitria/vox2vox_satu sequence/train_v2v.py", line 75, in fit
losses = train_step(Xb, yb, alpha)
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/func_graph.py", line 1147, in autograph_handler
raise e.ag_error_metadata.to_exception(e)
ValueError: in user code:
The text was updated successfully, but these errors were encountered: