simpleml.models.base_keras_model module¶
Base module for keras models. Keras has a native persistence mechanism so need to overwrite other methods at the root
-
class
simpleml.models.base_keras_model.
KerasModel
(use_training_generator=False, training_generator_params=None, use_validation_generator=False, validation_generator_params=None, use_sequence_object=False, **kwargs)[source]¶ Bases:
simpleml.models.base_model.LibraryModel
-
build_network
(external_model, **kwargs)[source]¶ Design choice to require build network method instead of exposing raw Keras objects that can be modified later. Simplifies saving and loading pattern because initialized object should also be the final state (as long as manual override doesnt happen)
-
created_timestamp
¶
-
feature_metadata
¶
-
filepaths
¶
-
has_external_files
¶
-
hash_
¶
-
id
¶
-
metadata_
¶
-
modified_timestamp
¶
-
name
¶
-
params
¶
-
pipeline
¶
-
pipeline_id
¶
-
project
¶
-
registered_name
¶
-
set_params
(**kwargs)[source]¶ Keras networks don’t have params beyond layers, which should be configured in self.build_network, so use this for fit params - self.fit will auto pull params and pass them to the fit method.
TODO: Figure out if changing params should be allowed after fit. If they are, would need to reinitialize model, otherwise it would train more epochs and not forget the original training. If not, once fit, we can treat the model as static, and no longer able to be changed
For now going with option 2 - cannot refit models
-
version
¶
-
version_description
¶
-