code: def __init__(
      self,
      executor: Callable = full_decode,
      fail_strategy="RAISE_ERROR",
      priority=0,
  ):
      # Hook params
      self.executor = executor
      self.inputs = ["video"]
      self.outputs = ["action_class"]
      self.fail_strategy = fail_strategy
      self.priority = priority
  
      side_size = 256
      mean = [0.45, 0.45, 0.45]
      std = [0.225, 0.225, 0.225]
      crop_size = 256
      num_frames = 32
      model = "x3d_s"
  
      self.transform = ApplyTransformToKey(
          key="video",
          transform=Compose(
              [
                  UniformTemporalSubsample(num_frames),
                  Lambda(lambda x: x / 255.0),
                  NormalizeVideo(mean, std),
                  ShortSideScale(size=side_size),
                  CenterCropVideo(crop_size),
              ]
          ),
      )
      # Init network
      self.model = torch.hub.load(
          "facebookresearch/pytorchvideo", model=model, pretrained=True
      )
      self.model = self.model.eval()
  
imports: from collections import OrderedDict
  from typing import Callable, List
  import attr
  import torch
  from pytorchvideo.data.decoder import DecoderType
  from pytorchvideo.data.encoded_video import EncodedVideo
  from pytorchvideo.transforms import ApplyTransformToKey, ShortSideScale, UniformTemporalSubsample
  from torchvision.transforms import Compose, Lambda
  from torchvision.transforms._transforms_video import CenterCropVideo, NormalizeVideo
label_desc: Use image node_id 1 to create a new X3DClsHook object from inherited base classes: HookBase with example: obj = X3DClsHook(executor, fail_strategy, priority)