I got this error to. The line
anchors = anchors.cpu(); grid_sizes = grid_sizes.cpu(); anchor_cnr = anchor_cnr.cpu()
happens after the error about weight type and input type.
.cpu() in a number of places:
def one_hot_embedding(labels, num_classes): return torch.eye(num_classes)[labels.data.cuda()] for i,o in enumerate(y): y[i] = o.cpu() learn.model.cpu()
I changed it and now do not get the runtime error about