It’s because you save the weights of the model as a state_dict of cuda tensors. This means that you have to load the state_dict in a model that has the same keys in the state_dict and has the same type of device (i.e. cuda).
To solve your problem, you should move the loading of your checkpoint after the if opt.cuda: as follows:
# model
model = SSD300(VOC.N_CLASSES)
cfg = model.config

model.init_parameters(opt.backbone)

encoder = MultiBox(cfg)
criterion = MultiBoxLoss()

# cuda
if opt.cuda:
    model.cuda()

    criterion.cuda()
    cudnn.benchmark = True
    model = torch.nn.DataParallel(model, device_ids=[0,1])

if opt.checkpoint:
    model.load_state_dict(torch.load(opt.checkpoint))

That way, you still initialize with your backbone of cpu weights, and then you load your saved state_dict if you test.