-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels