klyn.math.nn.Sequential.load
method
public static load(path as Path, maxBytes as ULong = 2147483648ul) as Sequential<T>
Description

Restores an independent model, including all saved training state. The static precision must equal the file dtype; no implicit conversion is performed. Limits, operator configurations, shapes and SHA-256 are checked. No arbitrary code or custom constructors are loaded. Continuation is between fit calls; fit's seed still restarts its shuffle. Device defaults to auto.

Parameters
ParameterDescription
pathLocal KNN checkpoint. @param maxBytes Maximum tensor bytes, 2 GiB by default.
Returns

Built model; compiled if training state was saved.

Throws
  • ValueException for incompatible data; IOException for corrupt/failed I/O.
Example

restored = Sequential<Float>.load(FilePath("MnistCNN.knn"))