jeya-maria-jose / Medical-Transformer

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

RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0 #74

Open Deerzh opened 2 years ago

Deerzh commented 2 years ago

when I run this command: python train.py --train_dataset "Traindata" --val_dataset "Traindata" --direc 'result' --batch_size 4 --epoch 400 --save_freq 10 --modelname "gatedaxialunet" --learning_rate 0.001 --imgsize 128 --gray "no", then an error occurred. Can you help me fix this issue?

RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 522 and 453 in dimension 2 at /opt/conda/conda-bld/pytorch_1579022034529/work/aten/src/TH/generic/THTensor.cpp:612

YHYeooooong commented 1 year ago

Hi, did you solve the issue? I have same problem