Parskatt / DKM

[CVPR 2023] DKM: Dense Kernelized Feature Matching for Geometry Estimation
https://parskatt.github.io/DKM/
Other
378 stars 28 forks source link

When using multi-GPU training, there is additional memory occupancy on GPU 0 #38

Closed qkqhd222 closed 1 year ago

qkqhd222 commented 1 year ago

Thanks for releasing such a great package. When I import dkm at my custom script, just importing makes additional memory occupancy on gpu 0.

image

Moving the following line to tensor_to_pil() seems to fix this.

imagenet_mean = torch.tensor([0.485, 0.456, 0.406]).to(device) imagenet_std = torch.tensor([0.229, 0.224, 0.225]).to(device)

(https://github.com/Parskatt/DKM/blob/main/dkm/utils/utils.py#L294)

Could you check?

Parskatt commented 1 year ago

Hi, thanks for noticing! Could you submit a pull request with it fixed?