hyz-xmaster/VarifocalNet

GPU error

LLsmile opened this issue · 3 comments

When I test my model with demo/image_demo.py, the strange CUDA error occurs. I train it on my server(10 GPU), and test it on my computer(only 1gpu).
RuntimeError: Attempting to deserialize object on CUDA device 7 but torch.cuda.device_count() is 1. Please use torch.load with map_location to map your storages to an existing device.

When I test it on the server, the model is running on GPU0 and GPU7.

Exactly speaking, when I train a model with only GPU7 and test it with GPU0, the inference procedure needs both GPU7 and GPU0. It seems the checkpoints must be loaded to the GPU which has been allocated in training.

Hi I have never run into this problem so can't give you advice in this. You may seek help from MMDetection community.