class_docstr: ResNet RoI head. This layer performs an optional pooling operation
  followed by an RoI projection, an optional 2D spatial pool, an optional dropout,
  a fully-connected projection, an activation layer
  and a global spatiotemporal averaging.
                                      Pool3d
                                         ↓
                                     RoI Align
                                         ↓
                                      Pool2d
                                         ↓
                                      Dropout
                                         ↓
                                     Projection
                                         ↓
                                     Activation
                                         ↓
                                     Averaging
  
  The builder can be found in `create_res_roi_pooling_head`.
class_docstr_tok: ["ResNet","RoI","head",".","This","layer","performs","an","optional","pooling","operation","followed","by","an","RoI","projection",",","an","optional","2D","spatial","pool",",","an","optional","dropout",",","a","fully-connected","projection",",","an","activation","layer","and","a","global","spatiotemporal","averaging",".","Pool3d","\u2193","RoI","Align","\u2193","Pool2d","\u2193","Dropout","\u2193","Projection","\u2193","Activation","\u2193","Averaging","The","builder","can","be","found","in","`","create_res_roi_pooling_head","`","."]
docstr: Args:
      pool (torch.nn.modules): pooling module.
      pool_spatial (torch.nn.modules): pooling module.
      roi_spatial (torch.nn.modules): RoI (Ex: Align, pool) module.
      dropout(torch.nn.modules): dropout module.
      proj (torch.nn.modules): project module.
      activation (torch.nn.modules): activation module.
      output_pool (torch.nn.Module): pooling module for output.
docstr_tok: ["Args",":","pool","(","torch.nn.modules",")",":","pooling","module",".","pool_spatial","(","torch.nn.modules",")",":","pooling","module",".","roi_spatial","(","torch.nn.modules",")",":","RoI","(","Ex",":","Align",",","pool",")","module",".","dropout","(","torch.nn.modules",")",":","dropout","module",".","proj","(","torch.nn.modules",")",":","project","module",".","activation","(","torch.nn.modules",")",":","activation","module",".","output_pool","(","torch.nn.Module",")",":","pooling","module","for","output","."]
code: def __init__(
      self,
      pool: nn.Module = None,
      pool_spatial: nn.Module = None,
      roi_layer: nn.Module = None,
      dropout: nn.Module = None,
      proj: nn.Module = None,
      activation: nn.Module = None,
      output_pool: nn.Module = None,
  ) -> None:
      """
      Args:
          pool (torch.nn.modules): pooling module.
          pool_spatial (torch.nn.modules): pooling module.
          roi_spatial (torch.nn.modules): RoI (Ex: Align, pool) module.
          dropout(torch.nn.modules): dropout module.
          proj (torch.nn.modules): project module.
          activation (torch.nn.modules): activation module.
          output_pool (torch.nn.Module): pooling module for output.
      """
      super().__init__()
      set_attributes(self, locals())
      assert self.proj is not None
  
imports: from typing import Callable, Tuple
  import torch
  import torch.nn
  from pytorchvideo.layers.utils import set_attributes
  from torchvision.ops import RoIAlign
label_desc: Use image node_id 1 to create a new ResNetRoIHead object from inherited base classes: nn with example: obj = ResNetRoIHead(pool, pool_spatial, roi_layer, dropout, proj, activation, output_pool)