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
I would like to use the given exemple using Unet3p on Oxford Pet dataset with a dataset containing gray images as input (masks have 3 labels, namely 1 2 3).
I tried without changing anything, as if the gray image were rgb images, Here is the error:
ValueError: Dimensions must be equal, but are 1048576 and 1572864 for '{{node hybrid_loss/mul}} = Mul[T=DT_FLOAT](hybrid_loss/Reshape, hybrid_loss/Reshape_1)' with input shapes: [1048576], [1572864].
The error lies in the line:
# train on batch
loss_ = unet3plus.train_on_batch([train_input,],
[train_target, train_target, train_target, train_target, train_target,])
Then I tried by changing the input_size from (128, 128, 3) to (128, 128, 1) and changing as well channel=3 to channel=1 but it did not work as well. Same Error, same line.
I would appreciate your help on this matter and/or the best way to use this script on gray images.
best regards
The text was updated successfully, but these errors were encountered:
hubsilon
changed the title
Possible bug in the exemple "UNET 3+ with deep supervision, classification-guided module, and hybrid loss" // n_labels vs input_tensor
How to use the exemple given using Unet3p on Oxford Pet dataset with a dataset containing gray images
Sep 8, 2022
Dear all,
I hope you're going well.
I would like to use the given exemple using Unet3p on Oxford Pet dataset with a dataset containing gray images as input (masks have 3 labels, namely 1 2 3).
I tried without changing anything, as if the gray image were rgb images, Here is the error:
ValueError: Dimensions must be equal, but are 1048576 and 1572864 for '{{node hybrid_loss/mul}} = Mul[T=DT_FLOAT](hybrid_loss/Reshape, hybrid_loss/Reshape_1)' with input shapes: [1048576], [1572864].
The error lies in the line:
# train on batch
loss_ = unet3plus.train_on_batch([train_input,],
[train_target, train_target, train_target, train_target, train_target,])
Then I tried by changing the input_size from (128, 128, 3) to (128, 128, 1) and changing as well channel=3 to channel=1 but it did not work as well. Same Error, same line.
I would appreciate your help on this matter and/or the best way to use this script on gray images.
best regards
The text was updated successfully, but these errors were encountered: