The same code runs fine on Mac but not on Linux. I am using the same version of PyTorch.
I have also put up the issue on PyTorch Github page. Please see the details here:

  
      github.com/pytorch/pytorch
  
  
    
  
	  
  

  
    
      Program runs fine on Mac but not on Linux (both CPU and GPU problems) 9
    

    
      
        opened 
        
          
        
        Jul 7, 2017
      
      

        
          closed 
        
          
        
        Jul 7, 2017
      
        

      
        
          
          salman1993
        
      
    
  



  Here is the link to my repo:
https://github.com/salman1993/simple-qa-on-kb/tree/master/clean/relation_prediction
The model code is very similar to the SNLI model example. The dataset may need...