Solved by Abhilash_Srivastava in post #3 
              
              
                This could be a problem. Instead, try this: 
        for batch in train_loader:
            feature, target = batch.text, batch.label