Oops, just realized that .view(-1,1) will not work for target values input into CrossEntropyLoss function. It returns an Error and states that multiclass classification is not supported. So…
Would this be the proper approach: loss =
lossFunction(output.view(-1, 160), targets.view(-1))