Solved by ptrblck in post #2 
              
              
                If you want to perform some operations on single samples, you could use a for loop and iterate your batch: 
for d, t in zip(data, target):
    # op on single sample