Get Started
Examples
Tutorials
中文文档
API Reference
Bases: torch.nn.Module
torch.nn.Module
Regularization function for embeddings.
p (int) – The power to use in the regularization. Defaults to 2.
int
2
weight_decay (float) – The weight of the regularization. Defaults to 1e-4.
float
1e-4
The forward function.
embs (List[torch.Tensor]) – The input embeddings.
List[torch.Tensor]