What kind of loss function are you using?
This line of code looks wrong:
loss = criterion(output[0],target)

since output[0] would return a tensor of [133], which would not be broadcastable with the target in [20].