for (int i = 0; i < output.numRows(); ++i) {
for (int j = 0; j < output.numCols(); ++j) {
output.set(i, j, Math.exp(output.get(i, j)));
}
}
double sum = output.elementSum();
// will be safe, since exp should never return 0
return output.scale(1.0 / sum);
}
/**