multiml.task.keras.keras_mlp module
- class multiml.task.keras.keras_mlp.MLPTask(input_shapes=None, layers=None, activation=None, activation_last=None, kernel_regularizer=None, bias_regularizer=None, batch_norm=False, **kwargs)
Bases:
KerasBaseTask
Keras MLP task.
- __init__(input_shapes=None, layers=None, activation=None, activation_last=None, kernel_regularizer=None, bias_regularizer=None, batch_norm=False, **kwargs)
- Parameters:
input_shapes (tuple) – shape for Keras.Inputs
layers (list) – list of hidden layers
activation (str) – activation function for MLP
activation_last (str) – activation function in last layer
kernel_regularizer (str) – kernel regularizer
bias_regularizer (str) – bias regularizer
batch_norm (bool) – use batch normalization
**kwargs – Arbitrary keyword arguments
- set_hps(hps)
Set thresholds. Cut-names are given by get_hyperparameters methods.
- Parameters:
hps (dict) – (hyperparameter name => hyperparameter value)
- build_model()
Build a Keras MLP model.
- get_inputs()
Returns keras Input from input_var_names.