class_docstr: Basic unit containing Conv3D + BatchNorm + non-linearity.
class_docstr_tok: ["Basic","unit","containing","Conv3D","+","BatchNorm","+","non-linearity","."]
docstr: Connects the module to inputs. Dynamically pad based on input size in forward function.
  Args:
      x: Inputs to the Unit3D component.
  
  Returns:
      Outputs from the module.
docstr_tok: ["Connects","the","module","to","inputs",".","Dynamically","pad","based","on","input","size","in","forward","function",".","Args",":","x",":","Inputs","to","the","Unit3D","component",".","Returns",":","Outputs","from","the","module","."]
code: def forward(self, x):
      """
      Connects the module to inputs. Dynamically pad based on input size in forward function.
      Args:
          x: Inputs to the Unit3D component.
  
      Returns:
          Outputs from the module.
      """
  
      # compute 'same' padding
      (batch, channel, time, height, width) = x.size()
      pad_t = self.compute_pad(0, time)
      pad_h = self.compute_pad(1, height)
      pad_w = self.compute_pad(2, width)
  
      pad_t_front = pad_t // 2
      pad_t_back = pad_t - pad_t_front
      pad_h_front = pad_h // 2
      pad_h_back = pad_h - pad_h_front
      pad_w_front = pad_w // 2
      pad_w_back = pad_w - pad_w_front
  
      pad = (
          pad_w_front,
          pad_w_back,
          pad_h_front,
          pad_h_back,
          pad_t_front,
          pad_t_back,
      )
      x = F.pad(x, pad)
  
      x = self.conv3d(x)
      if self._use_batch_norm:
          x = self.bn(x)
      if self._activation_fn is not None:
          x = self._activation_fn(x)
      return x
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from torch.hub import load_state_dict_from_url
label_desc: Use image node_id 3 for calling the Unit3D obj's underlying member method code with example usage: obj.forward(x) and returns: x