I am very new to Torch so please accept my novice questions 
I am getting the same error on the following:
loss_l, loss_c = criterion(out, targets)
loss = loss_l + loss_c
loss.backward()
Any advice about what I can do? I will really appreciate.