DL4J Classification Speed

networkOutput is a 10000x2 tensor, giving you all of those values. argMax would give you a 10000x1 array, telling you if it was the first or the second option that was the larger one. If you finally want to have a double[10000] array, all you need to do is call toDoubleVector on the result.

Or if you still aren’t convinced about the argMax thing, you might want to call toDoubleMatrix on it to get back your double[10000][2].

(There are also variants of it for Float and Int)

1 Like

Well then it turn’s out argMax is exactly what I’m looking for, thank you so much!