You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
head (nn.Module): A module to be attached to the encoder to perform specific task. If provided, it will replace the default member head (Default: ``None``)
87
+
load_weights (bool): Indicates whether or not to load weights if available. (Default: ``True``)
88
+
freeze_encoder (bool): Indicates whether or not to freeze the encoder weights. (Default: ``False``)
89
+
dl_kwargs (dictionary of keyword arguments): Passed to :func:`torch.hub.load_state_dict_from_url`. (Default: ``None``)
"""Class method to create model with user-defined encoder configuration and checkpoint
125
+
126
+
Args:
127
+
encoder_conf (RobertaEncoderConf): An instance of class RobertaEncoderConf that defined the encoder configuration
128
+
head (nn.Module): A module to be attached to the encoder to perform specific task. (Default: ``None``)
129
+
freeze_encoder (bool): Indicates whether to freeze the encoder weights. (Default: ``False``)
130
+
checkpoint (str or Dict[str, torch.Tensor]): Path to or actual model state_dict. state_dict can have partial weights i.e only for encoder. (Default: ``None``)
131
+
override_head (bool): Override the checkpoint's head state dict (if present) with provided head state dict. (Default: ``False``)
132
+
dl_kwargs (dictionary of keyword arguments): Passed to :func:`torch.hub.load_state_dict_from_url`. (Default: ``None``)
0 commit comments