EpipolarPose icon indicating copy to clipboard operation
EpipolarPose copied to clipboard

error: AttributeError: module 'torch.cuda' has no attribute 'comm'

Open siva-wellnesys opened this issue 3 years ago • 5 comments

hi i am getting this error , while running the demo.ipynb in google colab with my image. can you help me for this.

siva-wellnesys avatar Dec 11 '20 13:12 siva-wellnesys

I meet the same problem, Do you solve it ?

GeLee-Q avatar Dec 22 '20 11:12 GeLee-Q

I meet the same problem, Do you solve it ?

add "import torch.cuda.comm" in file lib/core/integral_loss.py

hustxxj avatar Dec 31 '20 02:12 hustxxj

I meet the same problem, Do you solve it ?

add "import torch.cuda.comm" in file lib/core/integral_loss.py

I add "import torch.cuda.comm"

But, It didn't working in file lib/core/integral_loss.py

HyunJai avatar Jan 20 '21 01:01 HyunJai

Which pytorch version are you using? It should work with the latest v1.7.

mkocabas avatar Jan 20 '21 14:01 mkocabas

In file lib/core/integral_loss.py

Chage below parts and then it will be working

accu_x = accu_x * torch.cuda.comm.broadcast(torch.arange(float(x_dim)), devices=[accu_x.device.index])[0]
accu_y = accu_y * torch.cuda.comm.broadcast(torch.arange(float(y_dim)), devices=[accu_y.device.index])[0]
accu_z = accu_z * torch.cuda.comm.broadcast(torch.arange(float(z_dim)), devices=[accu_z.device.index])[0]
device = torch.device('cuda')

accu_x = accu_x * torch.arange(float(x_dim)).to(device)
accu_y = accu_y * torch.arange(float(y_dim)).to(device)
accu_z = accu_z * torch.arange(float(z_dim)).to(device)

image

HyunJai avatar Jan 22 '21 00:01 HyunJai