hibou.nn.default_model#

hibou.nn.default_model(lr_opt: float = 0.01, units: Iterable[int] = (50, 25), activations: Iterable[str] = ('relu', 'relu'), input_shape: Iterable[int] = (10,), output_shape: int = 2)#

This function takes in arguments the hyperparameters and returns the compiled default model with the following configuration:

  • optimizer: Adam (with amsgrad)

  • loss: MeanSquaredError

  • metrics: ["accuracy", "mean_squared_root"]

Parameters#

lr_optfloat, optionnal

By default: 1e-2. The learning rate for the optimizer (AdamW with adamsgrad).

unitsIterable[int], optionnal

By default: (50, 25). The number of units per Dense layer.

activationsIterable[str], optionnal

By default: ("relu", "relu"). The activation method for each Dense layer.

input_shapeIterable[int], optionnal

By default: (10, ). The shape of the input layer.

output_shapeint, optionnal

By default: 2. The shape of the output layer.

Returns#

keras.models.Sequential

The model compiled with the given hyperparameters.