gnn (version 0.0-2)

to_savable_callable: Convert GNN objects to Savable or Callable Ones

Description

Keras objects cannot be saved like other R objects. The auxiliary functions to_savable() and to_callable() address this issue.

Usage

to_savable(gnn)
to_callable(gnn)

Arguments

gnn

GNN object.

Value

to_savable():

The GNN object with keras components replaced by savable ones.

to_callable():

The GNN object with certain components replaced by keras objects.

Details

For GMMNs, to_savable() calls serialize_model() and to_callable() calls unserialize_model().

For VAEs, to_savable() is (indirectly) based on save_model_weights_hdf5() and to_callable() on load_model_weights_hdf5(); one cannot work with serialize_model() or unserialize_model() in this case because of the involved layer_lambda().

See the source code for more details.