eqy:

target = [t.cuda() for t in target]).


Thanks for the reply, after applying the solution and putting``(target = [t.cuda() for t in target] )`
it gives me another following error, what would be the reason for this?
shall I use cat/stack?
RuntimeError: Expected 4-dimensional input for 4-dimensional weight [32, 3, 5, 5], but got 1-dimensional input of size [128] instead