class_docstr: MobileOne building block.
  
  This block has a multi-branched architecture at train-time
  and plain-CNN style architecture at inference time
  For more details, please refer to our paper:
  `An Improved One millisecond Mobile Backbone` -
  https://arxiv.org/pdf/2206.04040.pdf
class_docstr_tok: ["MobileOne","building","block",".","This","block","has","a","multi-branched","architecture","at","train-time","and","plain-CNN","style","architecture","at","inference","time","For","more","details",",","please","refer","to","our","paper",":","`","An","Improved","One","millisecond","Mobile","Backbone","`","-","https",":","\/\/arxiv.org\/pdf\/2206.04040.pdf"]
docstr: Apply forward pass.
docstr_tok: ["Apply","forward","pass","."]
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      """Apply forward pass."""
      # Inference mode forward pass.
      if self.inference_mode:
          return self.activation(self.se(self.reparam_conv(x)))
  
      # Multi-branched train-time forward pass.
      # Skip branch output
      identity_out = 0
      if self.rbr_skip is not None:
          identity_out = self.rbr_skip(x)
  
      # Scale branch output
      scale_out = 0
      if self.rbr_scale is not None:
          scale_out = self.rbr_scale(x)
  
      # Other branches
      out = scale_out + identity_out
      if self.rbr_conv is not None:
          for ix in range(self.num_conv_branches):
              out += self.rbr_conv[ix](x)
  
      return self.activation(self.se(out))
  
file_path: ml-fastvit/models/modules/mobileone.py
imports: from typing import Union, Tuple
  import copy
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the MobileOneBlock obj's underlying member method code with example usage: obj.forward(x) and returns: self, self