Yes, that is true, the model originated from training using:

model = torch.nn.DataParallel(model).cuda()

However, the line that throws the exception is the line the loads the model, like so:

        if os.path.isfile(mdl):
            print("=> loading checkpoint '{}'".format(mdl))
            **model.load_state_dict(torch.load(mdl))**
            model = torch.nn.DataParallel(model).cuda()                
        else:
            print("=> no checkpoint found at '{}'".format(mdl))


Is that what you meant by?:
add your model temporarily into DataParallel
Thanks,