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 designed

Subclass of Loss must implements __call__() and grad().

Methods Summary

__call__(x, y)

Compute Loss

grad()

Compute Gradient

Methods Documentation

__call__(x: Array, y: Array) Array#

Compute Loss

Parameters:
Returns:

loss – Loss

Return type:

vulkpy.Array

Notes

Subclass must implement this method.

grad() Array#

Compute Gradient

Returns:

grad – Gradient

Return type:

vulkpy.Array

Notes

Subclass must implement this method.

__init__()#