saveRDS | R Documentation |
DigitalDLSorter
objects as RDS filesSave DigitalDLSorter
and
DigitalDLSorterDNN
objects as RDS files. keras
models cannot be stored natively as R objects (e.g. RData or RDS files). By
saving the structure as a JSON-like character object and the weights as a
list, it is possible to retrieve the model and make predictions. If the
trained.model
slot is empty, the function will behave as usual.
Note: with this option, the state of optimizer is not saved, only
the architecture and weights. It is possible to save the entire model as an
HDF5 file with the saveTrainedModelAsH5
function and to load it
into a DigitalDLSorter
object with the
loadTrainedModelFromH5
function. See documentation for details.
saveRDS(
object,
file,
ascii = FALSE,
version = NULL,
compress = TRUE,
refhook = NULL
)
## S4 method for signature 'DigitalDLSorterDNN'
saveRDS(
object,
file,
ascii = FALSE,
version = NULL,
compress = TRUE,
refhook = NULL
)
## S4 method for signature 'DigitalDLSorter'
saveRDS(
object,
file,
ascii = FALSE,
version = NULL,
compress = TRUE,
refhook = NULL
)
object |
|
file |
File path where the object will be saved |
ascii |
a logical. If |
version |
the workspace format version to use. |
compress |
a logical specifying whether saving to a named file is
to use |
refhook |
a hook function for handling reference objects. |
No return value, saves a DigitalDLSorter
object
as an RDS file on disk.
DigitalDLSorter
saveTrainedModelAsH5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.