luz_load_model_weights: Loads model weights into a fitted object.

View source: R/serialization.R

luz_load_model_weightsR Documentation

Loads model weights into a fitted object.

Description

This can be useful when you have saved model checkpoints during training and want to reload the best checkpoint in the end.

Usage

luz_load_model_weights(obj, path, ...)

luz_save_model_weights(obj, path)

Arguments

obj

luz object to which you want to copy the new weights.

path

path to saved model in disk.

...

other arguments passed to torch_load().

Value

Returns NULL invisibly.

Warning

luz_save_model_weights operates inplace, ie modifies the model object to contain the new weights.


mlverse/torchlight documentation built on Sept. 19, 2024, 11:22 p.m.