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

One Channel Brain MRI Dataset #13

Closed
fitriaurbach0014 opened this issue Apr 15, 2022 · 1 comment
Closed

One Channel Brain MRI Dataset #13

fitriaurbach0014 opened this issue Apr 15, 2022 · 1 comment

Comments

@fitriaurbach0014
Copy link

fitriaurbach0014 commented Apr 15, 2022

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:

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 2, 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
@mdciri
Copy link
Owner

mdciri commented Apr 15, 2022 via email

@mdciri mdciri closed this as completed Mar 23, 2023
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

2 participants