ClassificationHead
class liqfit.modeling.ClassificationHead
Parameters:
in_features (int) Number of input features.
out_features (int) Number of output features.
pooler (nn.Module): Pooling function to use in case the input is not multi-target.
loss_func (nn.Module): Loss function that will be called if labels are passed.
bias (bool): Whether to use bias in the
nn.Linear
layer or not.temperature (int): Temperature that will be divided by the linear layer output to calibrate the output. (Defaults to 1.0)
eps (float): Epsilon will be added to the
temperature
for numerical stability. (Defaults to1e-5
).
Using LabelClassificationHead
For more flexibility in passing your loss function and your pooling method.
Last updated