From 5103222dd5a3e03a4f6269088fc76b409b51cfc4 Mon Sep 17 00:00:00 2001 From: Jerome Date: Wed, 7 Feb 2024 10:15:40 -0700 Subject: [PATCH] Handling cfloat issue identified at https://github.com/max810/XMem2/issues/20 --- inference/interact/fbrs/inference/predictors/brs_functors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inference/interact/fbrs/inference/predictors/brs_functors.py b/inference/interact/fbrs/inference/predictors/brs_functors.py index 92a5d99..222b61c 100644 --- a/inference/interact/fbrs/inference/predictors/brs_functors.py +++ b/inference/interact/fbrs/inference/predictors/brs_functors.py @@ -72,7 +72,7 @@ def __call__(self, x): self._last_mask = current_mask loss.backward() - f_grad = opt_params.grad.cpu().numpy().ravel().astype(np.float) + f_grad = opt_params.grad.cpu().numpy().ravel().astype(np.cfloat) return [f_val, f_grad]