Fix the input neuralnet for loss function