Belle II Software development
|
Public Member Functions | |
def | __init__ (self, int n=0) |
torch.tensor | forward (self, torch.tensor y, torch.LongTensor y_true) |
Public Attributes | |
n | |
Number of Taylor terms. | |
Class for calculation of Taylor cross entropy loss. Attributes: n (int): Number of Taylor series terms to be used for loss calculation.
Definition at line 45 of file torch_tcce.py.
def __init__ | ( | self, | |
int | n = 0 |
||
) |
Initialize the loss class. Parameters: n (int)(optional): Number of Taylor series terms to be used for loss calculation.
Definition at line 54 of file torch_tcce.py.
torch.tensor forward | ( | self, | |
torch.tensor | y, | ||
torch.LongTensor | y_true | ||
) |
Calculates the Taylor categorical cross entropy loss. Parameters: y(torch.tensor): Tensor containing the output of the model. y_true(torch.tensor): 1D tensor containing the truth value for a given set of features. Returns: The calculated loss as a torch tensor.
Definition at line 66 of file torch_tcce.py.
n |
Number of Taylor terms.
Definition at line 64 of file torch_tcce.py.