I am working with a GAN model, so I don’t calculate the accuracy, should I save the best validation G_loss and D_loss?
I am using the below code during training, is it correct:
if  min_valid_loss_g > valid_loss_g :
     print(f'G_Val_Loss_Decreased({min_valid_loss_g:.6f}--->{valid_loss_g:.6f})\t Saving The Model')
     min_valid_loss_g = valid_loss_g
     torch.save({
            'epoch': epoch,
            'G_state_dict': G.state_dict(),
            'G_optimizer_state_dict': optimizer_G.state_dict()
            'G_loss': valid_loss_g
            },f"./generator-epoch-{epoch}.pth")