klyn.math.nn.Sequential.loadWeights
method
public loadWeights(path as Path, maxBytes as ULong = 2147483648ul) as Void
Description

Loads parameters transactionally into an identically configured built model. Bits are copied without changing parameter or layer identities. Optimizer accumulators and loss scaling are reset; optimizer hyperparameters remain. Dropout random state and initializer seeds do not affect compatibility.

Parameters
ParameterDescription
pathLocal checkpoint. @param maxBytes Maximum staged tensor bytes.
Throws
  • ValueException for a mismatch; IOException for corrupt/failed I/O.
Example

model.loadWeights(FilePath("best.knn"))