NeuralNet.predict

Compute the prediction of the net for $(PARAM v). Runs forward-propagation and outputs the predicted vector.

  1. float[] predict(T v)
    class NeuralNet
    float[]
    predict
    (
    T
    )
    (
    T v
    )
    if (
    isAggregateType!T &&
    )
  2. float[] predict(T args)

Parameters

v T

observation with one or multiple features* attributes which have the types expected by the roots in proper order (i.e: float[], SparseF[], SparseFG[], custom roots types...)

Return Value

Type: float[]

array of last layer neurons values

Examples

struct O {
  float[] features_foo;
}
net.predict(O([1.2f, 0.7f]));

Meta