klyn.math.nn.Sequential.evaluate
method
public evaluate(notnull features as NDArray<T>, notnull labels as NDArray<Int>, batchSize as Long = 64l) as Evaluation
Description

Evaluates fixed parameters, without shuffling or optimizer updates.

Parameters
ParameterDescription
featuresTensor with a leading batch axis.
labelsInt class-index vector.
batchSizePositive maximum evaluation batch size.
Returns

Sample-weighted loss and accuracy, including a short last batch.

Throws
  • ValueException for invalid shapes, labels or batch size.
  • NullException if features, labels is null at runtime; statically null arguments are rejected with TypeError.
Example

result = model.evaluate(xTest, yTest, batchSize=64)