Solved by mathematics in post #2 
              
              
                May be You’ve defined not train_loader  in model arugment. I think   you shouldn’t put train_loader directly in argument,before train_loader was defined , so only data_loader would be fine.