_, predicted = torch.max(outputs_new.data, 1) stores the indices of the max values in dim1.
Alternatively you could also write predicted = torch.argmax(outputs_new, 1).
The error you get points to a missing dimension, i.e. it seems outputs_new has only a single dimension.