I found the cause of the error. I was passing map_location as an argument to model.load_state_dict() whereas  the correct usage is passing it as an argument to torch.load() like this -
model.load_state_dict(torch.load('model_trained.ckpt', map_location={'cuda:1': 'cuda:0'}))

On a side note, here
map_location={'cuda:1': 'cuda:0'}

means to take state_dict saved in cuda:1 format and transform it to cuda:0 format right?