get_model_from_catalog
- opennmt.models.get_model_from_catalog(name, as_builder=False)[source]
Gets a model from the catalog.
- Parameters
name – The model name in the catalog.
as_builder – If
True
, return a callable building the model on call.
- Returns
A
opennmt.models.Model
instance or a callable returning such instance.- Raises
ValueError – if the model
name
does not exist in the catalog.