class_docstr: Base class to calculate hidden state loss.
  Returned dict includes a loss value and additional outputs.
class_docstr_tok: ["Base","class","to","calculate","hidden","state","loss",".","Returned","dict","includes","a","loss","value","and","additional","outputs","."]
code: def __init__(self, loss_weight=1.0, name=""):
      super().__init__()
      self.name = name
      self.loss_weight = float(loss_weight)
  
imports: import math
  import torch
label_desc: Use image node_id 1 to create a new MegatronBaseHiddenLoss object from inherited base classes: torch.nn with example: obj = MegatronBaseHiddenLoss(loss_weight, name)