Loss#
- class vulkpy.nn.Loss#
Bases:
object
Abstract base class for Loss
See also
vulkpy.nn.CrossEntropyLoss
Cross Entropy Loss
vulkpy.nn.SoftmaxCrossEntropyLoss
Softmax Cross Entropy Loss
vulkpy.nn.HuberLoss
Huber Loss
vulkpy.nn.MSELoss
MSE Loss
vulkpy.nn.MixLoss
Mixing Loss
Notes
Loss
is designedSubclass of
Loss
must implements__call__()
andgrad()
.Methods Summary
Methods Documentation
- __call__(x: Array, y: Array) Array #
Compute Loss
- Parameters:
x (vulkpy.Array) – Input features
y (vulkpy.Array) – Output target/label
- Returns:
loss – Loss
- Return type:
Notes
Subclass must implement this method.
- grad() Array #
Compute Gradient
- Returns:
grad – Gradient
- Return type:
Notes
Subclass must implement this method.
- __init__()#