class_docstr: EmbMarginLoss, regularization on embeddings
class_docstr_tok: ["EmbMarginLoss",",","regularization","on","embeddings"]
code: def forward(self, *embeddings):
      dev = embeddings[-1].device
      cache_one = torch.tensor(1.0).to(dev)
      cache_zero = torch.tensor(0.0).to(dev)
      emb_loss = torch.tensor(0.0).to(dev)
      for embedding in embeddings:
          norm_e = torch.sum(
              embedding**self.power, dim=1, keepdim=True
          )
          emb_loss += torch.sum(
              torch.max(norm_e - cache_one, cache_zero)
          )
      return emb_loss
  
file_path: RecBole/recbole/model/loss.py
imports: import torch
  import torch.nn
label_desc: Use image node_id 2 for calling the EmbMarginLoss obj's underlying member method code with example usage: obj.forward() and returns: emb_loss