From 580a05d0399f47a0e1d6c1774ace366c202a98c6 Mon Sep 17 00:00:00 2001 From: Andreas Schuh Date: Thu, 14 Dec 2023 14:48:17 +0000 Subject: [PATCH] [core] Fix exception when passing FlowFields to F.grid_sample() --- src/deepali/data/flow.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/deepali/data/flow.py b/src/deepali/data/flow.py index 16f6d63..3372178 100644 --- a/src/deepali/data/flow.py +++ b/src/deepali/data/flow.py @@ -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)