klyn.math.nn.Sequential.predict
method
public predict(notnull features as NDArray<T>) as NDArray<T>
Description

Computes model outputs without applying any implicit output activation. A final affine layer returns logits; argMax selects the predicted class. Apply Softmax to these outputs when probabilities are needed for inference.

Parameters
ParameterDescription
featuresTensor [samples, ...sample dimensions].
Returns

Final layer output tensor; inputs and parameters are not changed.

Throws
  • NullException if features is null at runtime; statically null arguments are rejected with TypeError.
Example

classes = model.predict(xTest).argMax(1)