class_docstr: Args:
      causal(`string`):
          Causal mode.
      pretrained(`bool`):
          Pretrained models. If pretrained is True, num_classes is set to 600,
          conv_type is set to "3d" if causal is False, "2plus1d" if causal is True
          tf_like is set to True.
      num_classes(`int`):
          Number of classes for classifcation.
      conv_type(`string`):
          Type of convolution either 3d or 2plus1d
      tf_like(`bool`):
          Tf_like behaviour, basically same padding for convolutions.
class_docstr_tok: ["Args",":","causal","(","`","string","`",")",":","Causal","mode",".","pretrained","(","`","bool","`",")",":","Pretrained","models",".","If","pretrained","is","True",",","num_classes","is","set","to","600",",","conv_type","is","set","to","``","3d","''","if","causal","is","False",",","``","2plus1d","''","if","causal","is","True","tf_like","is","set","to","True",".","num_classes","(","`","int","`",")",":","Number","of","classes","for","classifcation",".","conv_type","(","`","string","`",")",":","Type","of","convolution","either","3d","or","2plus1d","tf_like","(","`","bool","`",")",":","Tf_like","behaviour",",","basically","same","padding","for","convolutions","."]
code: def avg(self, x: Tensor) -> Tensor:
      if self.causal:
          avg = F.adaptive_avg_pool3d(x, (x.shape[2], 1, 1))
          avg = self.cgap(avg)[:, :, -1:]
      else:
          avg = F.adaptive_avg_pool3d(x, 1)
      return avg
  
imports: from collections import OrderedDict
  import torch
  import torch.nn.functional
  from torch import nn, Tensor
  from towhee.models.movinet.movinet_block import ConvBlock3D, BasicBneck
  from towhee.models.utils.causal_module import CausalModule
  from towhee.models.layers.activations import Swish
  from towhee.models.layers.temporal_cg_avgpool3d import TemporalCGAvgPool3D
  from towhee.models.movinet.config import _C
label_desc: Use image node_id 2 for calling the MoViNet obj's underlying member method code with example usage: obj.avg(x) and returns: avg