class_docstr: BasicBneck
class_docstr_tok: ["BasicBneck"]
code: def forward(self, input_tensor: Tensor) -> Tensor:
      if self.res is not None:
          residual = self.res(input_tensor)
      else:
          residual = input_tensor
      if self.expand is not None:
          x = self.expand(input_tensor)
      else:
          x = input_tensor
      x = self.deep(x)
      x = self.se(x)
      x = self.project(x)
      result = residual + self.alpha * x
      return result
  
imports: from typing import Any, Callable, Optional, Tuple, Union
  from einops import rearrange
  import torch
  from torch.nn.modules.utils import _triple
  import torch.nn.functional
  from torch import nn, Tensor
  from towhee.models.utils.general_utils import make_divisible
  from towhee.models.utils.causal_module import CausalModule
  from towhee.models.layers.activations import HardSigmoid
  from towhee.models.layers.conv_bn_activation import Conv2dBNActivation, Conv3DBNActivation
  from towhee.models.layers.padding_functions import same_padding
  from towhee.models.layers.tf_avgpool3d import TfAvgPool3D
  from towhee.models.layers.temporal_cg_avgpool3d import TemporalCGAvgPool3D
label_desc: Use image node_id 2 for calling the BasicBneck obj's underlying member method code with example usage: obj.forward(input_tensor) and returns: result