Skip to content

backward doesn't work #7

@vertzeran

Description

@vertzeran

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions