Skip to content

TypeError: ChamferDistance.forward() got an unexpected keyword argument 'reduction' #28

@Shuhul24

Description

@Shuhul24

I have installed chamferdist package from github repo 4d-occ-forecasting by navigating through utils/chamferdist and then running the command pip install .. I have installed pytorch==2.0.0 and python==3.11 with CUDA 11.8. The error that I am ending up is:

Traceback (most recent call last):
  File "/csehome/p24cs0005/4d-occ-forecasting/test.py", line 317, in <module>
    test(args)
  File "/csehome/p24cs0005/4d-occ-forecasting/test.py", line 275, in test
    l1_error, absrel_error = compute_ray_errors(pred_pcd, gt_pcd, torch.from_numpy(origin), device)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/csehome/p24cs0005/4d-occ-forecasting/utils/evaluation.py", line 282, in compute_ray_errors
    _, info = chamfer_distance(
              ^^^^^^^^^^^^^^^^^
  File "/csehome/p24cs0005/.local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/csehome/p24cs0005/.local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ChamferDistance.forward() got an unexpected keyword argument 'reduction'

I tried installing chamferdist through pip install chamferdist==1.0.3 but I am ending with
issue#27.

What should I do?

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