Open vertzeran opened 2 years ago
Hello, trying to use in an optimization procedure. Trying out the demo code
import torch from chamfer_distance import ChamferDistance import time
chamfer_dist = ChamferDistance()
p1 = torch.rand([10,25,3], requires_grad=True) p2 = torch.rand([10,15,3], requires_grad=True)
dist1, dist2, idx1, idx2 = chamfer_dist(p1,p2) loss = (torch.mean(dist1)) + (torch.mean(dist2))
then adding loss.backwad()
I get : "TypeError: backward( takes 4 positional argument but 5 were given" using torch version 1.9.1 on a linux system.
Eran
Same for me with torch 1.8.0
@vertzeran @YishaiEArbe Please use the latest version of the code to solve the issue.
Hello, trying to use in an optimization procedure. Trying out the demo code
import torch from chamfer_distance import ChamferDistance import time
chamfer_dist = ChamferDistance()
p1 = torch.rand([10,25,3], requires_grad=True) p2 = torch.rand([10,15,3], requires_grad=True)
dist1, dist2, idx1, idx2 = chamfer_dist(p1,p2) loss = (torch.mean(dist1)) + (torch.mean(dist2))
then adding loss.backwad()
I get : "TypeError: backward( takes 4 positional argument but 5 were given" using torch version 1.9.1 on a linux system.
Eran