mkocabas / EpipolarPose

Self-Supervised Learning of 3D Human Pose using Multi-view Geometry (CVPR2019)
Other
597 stars 97 forks source link

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

Open siva-wellnesys opened 3 years ago

siva-wellnesys commented 3 years ago

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

GeLee-Q commented 3 years ago

I meet the same problem, Do you solve it ?

hustxxj commented 3 years ago

I meet the same problem, Do you solve it ?

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

HyunJai commented 3 years ago

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

mkocabas commented 3 years ago

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

HyunJai commented 3 years ago

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