Parallelization error

I parallelize the model using

net = torch.nn.DataParallel(net)

but I get the error

RuntimeError: expected device cuda:1 but got device cuda:0

A naive guess but could it be the case that you only have a single GPU in your system?