dcase_models.model.ModelContainer

class dcase_models.model.ModelContainer(model=None, model_path=None, model_name='ModelContainer', metrics=['classification'])[source]

Bases: object

Abstract base class to store and manage models.

Parameters:
model : keras model or similar

Object that defines the model (i.e keras.models.Model)

model_path : str

Path to the model file

model_name : str

Model name

metrics : list of str

List of metrics used for evaluation

__init__(model=None, model_path=None, model_name='ModelContainer', metrics=['classification'])[source]

Initialize ModelContainer

Parameters:
model : keras model or similar

Object that defines the model (i.e keras.models.Model)

model_path : str

Path to the model file

model_name : str

Model name

metrics : list of str

List of metrics used for evaluation

Methods

__init__([model, model_path, model_name, …]) Initialize ModelContainer
build() Missing docstring here
check_if_model_exists(folder, **kwargs) Missing docstring here
evaluate(X_test, Y_test[, scaler]) Missing docstring here
get_available_intermediate_outputs() Missing docstring here
get_intermediate_output(output_ix_name) Missing docstring here
get_number_of_parameters() Missing docstring here
load_model_from_json(folder, **kwargs) Missing docstring here
load_model_weights(weights_folder) Missing docstring here
save_model_json(folder) Missing docstring here
save_model_weights(weights_folder) Missing docstring here
train() Missing docstring here
build()[source]

Missing docstring here

check_if_model_exists(folder, **kwargs)[source]

Missing docstring here

evaluate(X_test, Y_test, scaler=None)[source]

Missing docstring here

get_available_intermediate_outputs()[source]

Missing docstring here

get_intermediate_output(output_ix_name)[source]

Missing docstring here

get_number_of_parameters()[source]

Missing docstring here

load_model_from_json(folder, **kwargs)[source]

Missing docstring here

load_model_weights(weights_folder)[source]

Missing docstring here

save_model_json(folder)[source]

Missing docstring here

save_model_weights(weights_folder)[source]

Missing docstring here

train()[source]

Missing docstring here