model.deeplearn.regularizer package
Submodules
model.deeplearn.regularizer.features_orthogonal_regularizer module
- class model.deeplearn.regularizer.features_orthogonal_regularizer.FeaturesOrthogonalRegularizer(**kwargs)
Bases:
RegularizerFeaturesOrthogonalRegularizer regularizer to enforce orthogonality in the feature space. Taken from the Keras web documentation on 2023-07-19 https://keras.io/examples/vision/pointnet
- __init__(**kwargs)
Initialize the FeaturesOrthogonalRegularizer regularizer. See
regularizer.Regularizer.__init__().
- __call__(x, training=False, mask=False)
The computational logic of the features orthogonal regularizer. See
regularizer.Regularizer.__call__(). :param x: The input tensor.
- get_config()
Obtain the dictionary specifying how to serialize the features orthogonal regularizer.
- Returns:
The dictionary with the necessary data to serialize the features orthogonal regularizer.
- Return type:
dict
- classmethod from_config(cfg)
Deserialize a features ortoghonal regularizer from given specification.
- Parameters:
cfg – The dictionary specifying how to deserialize the regularizer.
- Returns:
The deserialized orthogonal regularizer.
- Return type:
:class:.FeaturesOrthogonalRegularizer`
model.deeplearn.regularizer.regularizer module
- class model.deeplearn.regularizer.regularizer.Regularizer(**kwargs)
Bases:
Regularizer- Author:
Alberto M. Esmoris Pena
A regularizer can be seen as a map \(f\) from an input tensor \(\mathcal{X}\) to an output scalar \(y\) that can be added to the loss function.
The Regularizer class provides an interface that must be realized by any class that must assume the role of a regularizer inside a neural network.
- __init__(**kwargs)
Initialize the member attributes of the regularizer.
- Parameters:
kwargs – The key-word specification to parametrize the regularizer.
- __call__(x)
The regularizer’s computation logic.
- Parameters:
x – The input tensor.
- Returns:
The output scalar.
- get_config()
The dictionary specifying how to serialize the regularizer.
- Returns:
The dictionary with the necessary data to serialize the regularizer.
- Return type:
dict
Module contents
- author:
Alberto M. Esmoris Pena
The layer package contains the logic to handle the regularizer of a neural network.