The colab notebook on Pytorch Tutorial was not written for the Google Colab, but it was originally written for ubuntu.
I think it is important to make it able to run for the colab since I know some students that they do not have GPU. But they can run it on colab to use Google’s GPU.
But I fixed it to make it run for the colab.
https://colab.research.google.com/drive/1MqChDo1qgHvRBtMNM0nS8q9ZCmDIQ8bL 13
I have also made it for a pull request

  
      github.com/pytorch/tutorials
  
  
    
  
    
  

  
    
      Changing the DCGAN Face Notebook to be able to run it on Google colab. 2
    

    
      pytorch:gh-pages ← JonathanSum:gh-pages
    

    
      
        opened 
        
          
        
        Dec 29, 2019
      
      

      
        
          
          JonathanSum
        
      

      
        
          +1181
          -111