autopycoin.models.BaseModel#

class autopycoin.models.BaseModel(*args, **kwargs)[source]#

Base model which defines pre/post-processing methods to override.

This model aims to be inherited and brings six functionality. - preprocessing : Preprocess the inputs data - post_processing : Preprocess the outputs data - init_params : initialize parameters before build method - metrics_wrapper : Preprocess y_true or y_pred - losses_wrapper : Preprocess y_true or y_pred This three wrappers have to be overriden - Typing check.

handle_dim_in_losses_and_metrics(outputs: Union[List[Union[tensorflow.python.framework.ops.Tensor, autopycoin.extension_type.QuantileTensor, autopycoin.extension_type.UnivariateTensor]], tensorflow.python.framework.ops.Tensor, autopycoin.extension_type.QuantileTensor, autopycoin.extension_type.UnivariateTensor]) None[source]#

Build and wrap losses and metrics.

losses_wrapper(loss: keras.losses.LossFunctionWrapper) Union[Callable, keras.losses.LossFunctionWrapper][source]#

Wrap the fn function.

See tf.keras.losses.LossFunctionWrapper docstring for more informations about fn.

metrics_wrapper(metrics: Any) Union[Callable, keras.losses.LossFunctionWrapper][source]#

Wrap the update_state function.

See tf.keras.metrics.Metric docstring for more informations about update_state.