Skip to content

spleen segmentation - torch sizes of val_outputs, val_labels #1615

Answered by rijobro
ctpn asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, the fluctuations that you are seeing are caused by the transforms applied to the images/labels. In this particular example, it is CropForegroundd, which crops the image as small as possible without cropping any non-zero voxels. This depends on the image, and is the reason why you see these differences. You wouldn't see the fluctuations in the training data, however, because the transformation following CropForegroundd is RandCropByPosNegLabeld, which is creating 4 examples, each of size (96,96,96).

Having images of different sizes compared to each other is fine, but will cause an error if you have batch size > 1, since the tensors will be concatenated together, which requires them to …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ctpn
Comment options

Answer selected by ctpn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants