-
Hello, I am trying to modify the 3D Spleen Segmentation tutorial for my own dataset. In the 'Execute a typical PyTorch training process' cells, I get the error, From StackOverflow, it seems that this could is likely a mismatch between the number of channels in 'outputs' vs 'labels'. My labelled images are grayscale 3D images, and I have kept
Other users have also recommended adding Any advice would be greatly appreciated, thank you. Code is also included below. Error message:
Code:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi, before looking through your code more closely, if the StackOverflow post recommends running on the CPU rather than the GPU, then this can be done by replacing this: Perhaps try that first and see if the error is more informative. |
Beta Was this translation helpful? Give feedback.
Hi, before looking through your code more closely, if the StackOverflow post recommends running on the CPU rather than the GPU, then this can be done by replacing this:
device = torch.device("cuda:0")
with this:device = torch.device("cpu")
.Perhaps try that first and see if the error is more informative.