Skip to content

Commit

Permalink
[core] Fix exception when passing FlowFields to F.grid_sample()
Browse files Browse the repository at this point in the history
  • Loading branch information
aschuh-hf committed Dec 14, 2023
1 parent a4b1359 commit 580a05d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/deepali/data/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ def _torch_function_result(

@classmethod
def __torch_function__(cls, func, types, args=(), kwargs=None):
if func == F.grid_sample:
raise ValueError("Argument of F.grid_sample() must be a batch, not a single image")
if kwargs is None:
kwargs = {}
data = Tensor.__torch_function__(func, (Tensor,), args, kwargs)
Expand Down

0 comments on commit 580a05d

Please sign in to comment.