Out of memory during torch.save

how did you shift the model to cpu