This functions download the keras model from the TengMCing/autovi_data
Github repo using download.file()
and load the model.
Arguments
- model_name
String. The model name. See also
list_keras_model()
.- format
String. The model format to download. Either "npz", "SavedModel" or "keras".
Details
Note that the "SavedModel" and "keras" formats are not supported in
tensorflow
versions above 2.15, as
reticulate::import("tensorflow")$keras$models$load_model
encounters issues
when loading models saved with the Keras 2 API.
Instead, using the "npz" format allows for rebuilding the model
from scratch and loading the weights from a ".npz" file, offering a more
reliable alternative.