jeya-maria-jose / Medical-Transformer

Official Pytorch Code for "Medical Transformer: Gated Axial-Attention for Medical Image Segmentation" - MICCAI 2021
MIT License
799 stars 176 forks source link

Question about loss = criterion(output, y_batch) #63

Closed pleasurepants closed 2 years ago

pleasurepants commented 2 years ago

Sry to interupt, but when i was using my own dataset to train the model. I've found a question about following. Can u explain that for me? image

jeya-maria-jose commented 2 years ago

The dimension of your tensor should be of the form NCHW and not NHWC while using cross-entropy loss.