Thanks for responding.
So basically my use case is to generate 0-9 mnist numbers using cGAN. However, I want to learn these 0-9 numbers (classes and corresponding images) in two steps.
Step1: The model learns 0 to 5 classes first.
Step2: The model learns the remaining classes i.e. 6 to 9 however WITHOUT forgetting step 1 learned classes i.e. after step 2 my model can generate images of all classes 0-9.
I have recently moved from tensorflow to pytorch. In TF I can easily do this without any extra code.
From the below thread I can see that in Pytorch I cannot do this because torch.save() overwrites and doesn’t provide any append functionality.

  

      github.com/pytorch/pytorch
  

  
    
  
	  
  

  
    
      torch.save overwrite 1
    

    
      
        opened 
        
          
        
        Feb 4, 2019
      
      


      
        
          
          shayneobrien
        
      
    

    
        
          high priority
        
        
          triaged
        
        
          enhancement
        
    
  


  
    ## 🚀 Feature

Add an overwrite feature to torch.save (default: True) or throw …a warning that a file will not overwrite an already existing file.

## Motivation
The current [workaround](https://discuss.pytorch.org/t/how-to-save-a-model-from-a-previous-epoch/20252/4) is to save a new model at each epoch. This is helpful in many applications, but saving a single model file when you know overfitting will not be an issue (e.g. when reimplementing a paper) would save a lot of memory when training large models as well as remove the need for a workaround using os / shutil functions. The default in all other applications I have seen is to overwrite the file.

cc @ezyang @gchanan @zou3519