Pytorch implementation of Feature Pyramid Network (FPN) for Object Detection
MIT License
952
stars
221
forks
source link
There was a bug when I continued to train the model. RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #4 'other' #45
when i try to resume to train the model :
RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #4 'other'
I have sloved it,
add this:
if args.cuda:
FPN.cuda()
before the code(about line 290):
if args.resume:
load_name = os.path.join(outputdir,
'fpn{}{}{}.pth'.format(args.checksession, args.checkepoch, args.checkpoint))
when i try to resume to train the model : RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #4 'other'