@Gul_Zain It was nice reading your soliloquy, but I really loved it. And above anything, it solved the same issue i had. Though I also found out that this 40 tutorial on DataLoader class says about the len function. OMG, if only pytorch had good documentation and tutorials which explicitly mentions this. Even if it does, I somehow can never find one when I need one. Its like these important things are hidden somewhere deep inside a broad “intro to pytorch” tutorial…