Thanks, i added the code and tested the code works well in Python 2.7.
I have opened pull request below.

  
      github.com/pytorch/pytorch
  
  
    
  
    
  

  
    
      Support unicode objects in default_collate (Issue #826) 34
    

    
      pytorch:master ← yunjey:patch-3
    

    
      
        opened 
        
          
        
        Feb 23, 2017
      
      

      
        
          
          yunjey
        
      

      
        
          +4
          -0