YaoZhang93 / mmFormer

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

IndexError: The shape of the mask [1, 4] at index 0 does not match the shape of the indexed tensor [2, 4, 8, 256, 256, 32] at index 0 #15

Closed ffen908 closed 6 months ago

ffen908 commented 6 months ago

https://github.com/YaoZhang93/mmFormer/blob/b18663adbfd0323656083e0470420c8c715c1782/mmformer/mmformer.py#L309

您好,這裏x的shape是BKCHWZ,K表示的應該為四個modalities的叠加,這裏給modality加mask,是不是位置錯了。應該在dim=1