You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument max in method wrapper_clamp_Tensor)
We get this error when running the following command as in instructions:
python ./code/test.py --dataset nyudepthv2 --data_path ./datasets/ --ckpt_dir <path_for_ckpt> --do_evaluate --max_depth 10.0 --max_depth_eval 10.0
The workaround is to add device parameter in line 294 of MIM-Depth-Estimation/models/swin_transformer_v2.py as shown below:
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument max in method wrapper_clamp_Tensor)
We get this error when running the following command as in instructions:
python ./code/test.py --dataset nyudepthv2 --data_path ./datasets/ --ckpt_dir <path_for_ckpt> --do_evaluate --max_depth 10.0 --max_depth_eval 10.0
The workaround is to add device parameter in line 294 of MIM-Depth-Estimation/models/swin_transformer_v2.py as shown below:
logit_scale = torch.clamp(self.logit_scale, max=torch.log(torch.tensor(1. / 0.01, device=self.logit_scale.device))).exp()
Please correct this issue
The text was updated successfully, but these errors were encountered: