code: def trunc_normal_(x:Tensor, mean:float=0., std:float=1.) -> Tensor:
      "Truncated normal initialization."
      # From https://discuss.pytorch.org/t/implementing-truncated-normal-initializer/4778/12
      return x.normal_().fmod_(2).mul_(std).add_(meanf trunc_normal_(x:Tensor, mean:float=0., std:float=1.) -> Tensor:
      "Truncated normal initialization."
      # From https://discuss.pytorch.org/t/implementing-truncated-normal-initializer/4778/12
      return x.normal_().fmod_(2).mul_(std).add_(mean)
docs: Truncated normal initialization.