class_docstr: Layer scale from [Touvron et al 2021] (https://arxiv.org/pdf/2103.17239.pdf).
  This rescales diagonally residual outputs close to 0 initially, then learnt.
class_docstr_tok: ["Layer","scale","from","[","Touvron","et","al","2021","]","(","https",":","\/\/arxiv.org\/pdf\/2103.17239.pdf",")",".","This","rescales","diagonally","residual","outputs","close","to","0","initially",",","then","learnt","."]
docstr: LayerScale forward call
  
  Args:
      x (torch.Tensor): input tensor for LayerScale
  
  Returns:
      Tensor
          Output after rescaling tensor.
docstr_tok: ["LayerScale","forward","call","Args",":","x","(","torch.Tensor",")",":","input","tensor","for","LayerScale","Returns",":","Tensor","Output","after","rescaling","tensor","."]
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      r"""LayerScale forward call
  
      Args:
          x (torch.Tensor): input tensor for LayerScale
  
      Returns:
          Tensor
              Output after rescaling tensor.
      """
      return self.scale[:, None] * x
  
imports: import math
  import typing
  from typing import Any, Dict, List, Optional
  import torch
  from torch import nn
  from torch.nn import functional
label_desc: Use image node_id 2 for calling the _LayerScale obj's underlying member method code with example usage: obj.forward(x) and returns: unknown