model_saver
ModelSaver
¶
Bases: Trace
Save model weights based on epoch frequency during training.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
Union[Model, Module]
|
A model instance compiled with fe.build. |
required |
save_dir
|
str
|
Folder path into which to save the |
required |
frequency
|
int
|
Model saving frequency in epoch(s). |
1
|
max_to_keep
|
Optional[int]
|
Maximum number of latest saved files to keep. If 0 or None, all models will be saved. |
None
|
weights_name
|
Optional[str]
|
The prefix used for saving model weights. If None model.model_name will be used as a prefix. |
None
|
save_architecture
|
bool
|
Whether to save the full model architecture in addition to the model weights. This option is
only available for TensorFlow models at present, and will generate a folder containing several files. The
model can then be re-instantiated even without access to the original code by calling:
tf.keras.models.load_model( |
False
|
Raises:
Type | Description |
---|---|
ValueError
|
If |