| preparingToSave {SpatialDDLS} | R Documentation |
Prepare SpatialDDLS object to be saved as an RDA file
Description
This function prepares a SpatialDDLS object to be saved
as an RDA file when contains a DeconvDLModel object with
a trained DNN model.
Usage
preparingToSave(object)
Arguments
object |
|
Details
Since keras models cannot be saved natively as R objects, this function
saves the structure of the model as a JSON-like character object and its
weights as a list. This allows for the retrieval of the model and making
predictions. It is important to note that the state of the optimizer is not
saved, only the model's architecture and weights. To save the entire model,
please see the saveTrainedModelAsH5 and
loadTrainedModelFromH5 functions.
It is also possible to save a SpatialDDLS object as an
RDS file with the saveRDS function without any preparation.
Value
A SpatialDDLS or
DeconvDLModel object with its trained keras model
transformed from a keras.engine.sequential.Sequential class into a
list with its architecture as a JSON-like character object, and its
weights as a list.