YaoZhang93 / mmFormer

[MICCAI 2022] The official code for "mmFormer: Multimodal Medical Transformer for Incomplete Multimodal Learning of Brain Tumor Segmentation"
Apache License 2.0
91 stars 10 forks source link

pytorch1.7.0,python3.6,can you solve this problem? #17

Open nnnnnnml opened 1 month ago

nnnnnnml commented 1 month ago

Traceback (most recent call last): File "/media/jxust/磁盘2/mmFormer-main/mmformer/train.py", line 248, in main() File "/media/jxust/磁盘2/mmFormer-main/mmformer/train.py", line 166, in main fuse_pred, sep_preds, prm_preds = model(x, mask) File "/home/jxust/anaconda3/envs/nnformer/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, kwargs) File "/home/jxust/anaconda3/envs/nnformer/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 159, in forward return self.module(*inputs[0], *kwargs[0]) File "/home/jxust/anaconda3/envs/nnformer/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(input, kwargs) File "/media/jxust/磁盘2/mmFormer-main/mmformer/mmformer.py", line 361, in forward flair_x1, flair_x2, flair_x3, flair_x4, flair_x5 = self.flair_encoder(x[:, 0:1, :, :, :]) File "/home/jxust/anaconda3/envs/nnformer/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, *kwargs) File "/media/jxust/磁盘2/mmFormer-main/mmformer/mmformer.py", line 40, in forward x1 = self.e1_c1(x) File "/home/jxust/anaconda3/envs/nnformer/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(input, **kwargs) File "/home/jxust/anaconda3/envs/nnformer/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 569, in forward return F.conv3d(F.pad(input, self._reversed_padding_repeated_twice, mode=self.padding_mode), File "/home/jxust/anaconda3/envs/nnformer/lib/python3.6/site-packages/torch/nn/functional.py", line 3581, in _pad raise NotImplementedError NotImplementedError

YaoZhang93 commented 1 month ago

You should change the pytorch from version 1.7.0 to 1.2.0, which I have provided in the Google Drive. Besides, I tried pytorch>2.0 and it works well.