LiqFitModel
class liqfit.modeling.Model
Parameters:
config (PretrainedConfig): Backbone configuration.
backbone (nn.Module): Pretrained model (backbone).
head (LiqFitHead): Downstream head.
loss_func (Optional[nn.Module]): Loss function that will be called after each forward pass (if labels are passed). (Defaults to
None
).normalize_backbone_embeddings (bool): Whether to normalize the output embeddings from the backbone or not using the
torch.nn.functional.normalize
. (Defaults to False).labels_name (str): Labels parameter name that was passed to the
forward
methodpush_backbone_only (bool, optional): Whether to push the wrapped model or only push the
backbone
model to Hugging Face.
Using `LiqFitModel` class with `transformers` library.
Using `LiqFitModel` with one of the available heads.
Last updated