Thank you for your reply. I just found my problem. It was about the loss backward part rather than dataset loading. It may because of my model itself. I am still investigating it and just opening a thread 12.