I saved my model like this:
torch.save({
            'epoch': all_epochs,
            'Gmodel_state_dict': gen.state_dict(),
            'Dmodel_state_dict': crit.state_dict(),
            'G_optimizer':gen_opt.state_dict(),
            'D_optimizer':crit_opt.state_dict()
            }, 'WGAN-GP-lr1-0.0002.pt')

For loading the model I wrote these lines of code:
checkpoint = torch.load('WGAN-GP-lr1-0.0002.pt')
gen.load_state_dict(checkpoint['Gmodel_state_dict']) # Load Generator model
crit.load_state_dict(checkpoint['Dmodel_state_dict']) # load Discriminator model
gen_opt.load_state_dict(checkpoint['G_optimizer']) # Load Generator's optimizer
crit_opt.load_state_dict(checkpoint['D_optimizer']) # Load Discriminator's optimizer
previous_epochs = checkpoint['epoch']
epoch_flag = True
print("Number of Epochs after training:",previous_epochs)

During loading the model I am getting this error:
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
I don’t have any idea why this error is occurring and how would I resolve it. Kindly guide me. Any help shall be highly appreciated.
Note: I am loading and saving the model in google colab.