HieuPhan33 / MaskGAN

MaskGAN for unpaired MR-to-CT synthesis. Official implementation of MICCAI 2023
22 stars 5 forks source link

Run MaskGAN in Colab #2

Closed fatemeh-phd76 closed 8 months ago

fatemeh-phd76 commented 8 months ago

HI; Thank you for sharing your knowledge and providing excellent code. The topic of your study was very interesting to me, and I have decided to run your code in my Colab environment. Therefore, I created a environment in Google Drive and installed Python3.8, PyTorch1.8, and Apex 0.1 in it. I also installed the requirement.txt files. also created root folder with .nii MRI and CT images and out folder for main.py preprocessing. However, when attempting to run the train.py file, I encounter an error "
from apex.transformer.utils import split_tensor_into_1d_equal_chunks File "/usr/local/lib/python3.8/dist-packages/apex/transformer/utils.py", line 11, in torch.distributed.all_gather_into_tensor = torch.distributed._all_gather_base AttributeError: module 'torch.distributed' has no attribute '_all_gather_base' " like this. I wanted to ask if you could guide me on the Apex version and the process of execution, if possible. Your attention is due to your kindness.

HieuPhan33 commented 8 months ago

Hi,

There could be issues with apex the latest version. In this post: https://github.com/NVIDIA/apex/issues/1532, they suggest using an older branch 22.04-dev.

Could you please try?

Otherwise, you can directly using my docker container image with all pre-installed libraries/environments.

fatemeh-phd76 commented 8 months ago

Hi,

There could be issues with apex the latest version. In this post: NVIDIA/apex#1532, they suggest using an older branch 22.04-dev.

Could you please try?

With thanks for your attention. Yes this worked for me.