NeuralNet.predict

Compute the prediction of the net when passing the arguments to the root(s) of the net.

  1. float[] predict(T v)
  2. float[] predict(T args)
    class NeuralNet
    float[]
    predict
    (
    T...
    )
    ()

Parameters

args T

the data to feed to the roots in proper order

Return Value

Type: float[]

array of last layer neurons values

Examples

// net with a single DenseData(2) root:
net.predict([3.2f, -1.5f]);
// net with a single SparseData(dim >= 34) root:
net.predict([SparseF(34, -0.7f), SparseF(3, 0.2f)]);
// net with one DenseData(1), one SparseData(dim >= 16) root:
net.predict([0.2f], [SparseF(16, -0.15f)]);

Meta