Regularizer#
- class vulkpy.nn.Regularizer#
Bases:
object
Abstract base class for Regularizer
See also
vulkpy.nn.Lasso
Lasso (L1) Regularizer
vulkpy.nn.Ridge
Ridge (L2) Regularizer
vulkpy.nn.Elastic
Elastic (L1 + L2) Regularizer
Notes
Subclass must implement
loss()
andgrad()
.Methods Summary
Methods Documentation
- grad(param: Array) Array #
Compute Gradient
- Parameters:
param (vulkpy.Array) – Parameters
- Returns:
grad – Gradient
- Return type:
Notes
Subclass must implement this method.
- loss(param: Array) Array #
Compute Regularizer Loss
- Parameters:
param (vulkpy.Array) – Parameters
- Returns:
loss – Loss
- Return type:
Notes
Subclass must implement this method.
- __init__()#