Yeah, Do not use the NLL Loss. It is better to use the  MSE Loss fucntion. Replace NLL with torch.nn.MSELoss. When you are using MSELosss, remove the LogSoftmax function. Note that the sizes of target and output_1 would have to be the same.