Skip to content

Commit 05c29c7

Browse files
committed
Fix some numpy issues
1 parent ec9c248 commit 05c29c7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

maskprop/Med-STCN/dataset/med_dataset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def __getitem__(self, idx):
181181
sec_masks = np.zeros_like(tar_masks)
182182
selector = torch.FloatTensor([1, 0])
183183

184-
cls_gt = np.zeros((3, 384, 384), dtype=np.int)
184+
cls_gt = np.zeros((3, 384, 384), dtype=int)
185185
cls_gt[tar_masks[:,0] > 0.5] = 1
186186
cls_gt[sec_masks[:,0] > 0.5] = 2
187187

maskprop/MiVOS/fbrs/inference/predictors/brs_functors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __call__(self, x):
7272
self._last_mask = current_mask
7373

7474
loss.backward()
75-
f_grad = opt_params.grad.cpu().numpy().ravel().astype(np.float)
75+
f_grad = opt_params.grad.cpu().numpy().ravel().astype(np.float64)
7676

7777
return [f_val, f_grad]
7878

0 commit comments

Comments
 (0)