View source: R/serialization.R
luz_save | R Documentation |
Allows saving luz fitted models to the disk. Objects can be loaded back with
luz_load()
.
luz_save(obj, path, ...)
obj |
an object of class 'luz_module_fitted' as returned by
|
path |
path in file system to the object. |
... |
currently unused. |
The ctx is naively serialized. Ie, we only use saveRDS()
to serialize it.
Don't expect luz_save
to work correctly if you have unserializable objects
in the ctx like torch_tensor
s and external pointers in general.
Objects are saved as plain .rds
files but obj$model
is serialized
with torch_save
before saving it.
Other luz_save:
luz_load()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.