V2AI / Det3D

World's first general purpose 3D object detection codebse.
https://arxiv.org/abs/1908.09492
Apache License 2.0
1.48k stars 299 forks source link

Bugs when resume from checkpoint file #104

Closed Kins1ley closed 4 years ago

Kins1ley commented 4 years ago

Hi, when I resume from the checkpoint file, I found that it produced erro when called

_checkpoint = torch.load(filename, map_location=maplocation)

The error is int object is not callable.

Because _maplocation is calculated in the following code:

_map_location = torch.cuda.currentdevice()

and the result is int number.

Kins1ley commented 4 years ago

I just changed the code into

checkpoint = torch.load(filename)

And it seems no bug.

poodarchu commented 4 years ago

you can try map_location = torch.cuda.device(torch.cuda.current_device())