class_docstr: Torch autograd Function wrapper for packed_to_padded C++/CUDA implementations.
docstr: Args:
      ctx: Context object used to calculate gradients.
      inputs: FloatTensor of shape (F, D), representing the packed batch tensor.
          e.g. areas for faces in a batch of meshes.
      first_idxs: LongTensor of shape (N,) where N is the number of
          elements in the batch and `first_idxs[i] = f`
          means that the inputs for batch element i begin at `inputs[f]`.
      max_size: Max length of an element in the batch.
  
  Returns:
      inputs_padded: FloatTensor of shape (N, max_size, D) where max_size is max
          of `sizes`. The values for batch element i which start at
          `inputs[first_idxs[i]]` will be copied to `inputs_padded[i, :]`,
          with zeros padding out the extra inputs.
docstr_tok: ["Args",":","ctx",":","Context","object","used","to","calculate","gradients",".","inputs",":","FloatTensor","of","shape","(","F",",","D",")",",","representing","the","packed","batch","tensor",".","e.g",".","areas","for","faces","in","a","batch","of","meshes",".","first_idxs",":","LongTensor","of","shape","(","N",",",")","where","N","is","the","number","of","elements","in","the","batch","and","`","first_idxs","[","i","]","=","f","`","means","that","the","inputs","for","batch","element","i","begin","at","`","inputs","[","f","]","`",".","max_size",":","Max","length","of","an","element","in","the","batch",".","Returns",":","inputs_padded",":","FloatTensor","of","shape","(","N",",","max_size",",","D",")","where","max_size","is","max","of","`","sizes","`",".","The","values","for","batch","element","i","which","start","at","`","inputs","[","first_idxs","[","i","]","]","`","will","be","copied","to","`","inputs_padded","[","i",",",":","]","`",",","with","zeros","padding","out","the","extra","inputs","."]
code: def forward(ctx, inputs, first_idxs, max_size):
      """
      Args:
          ctx: Context object used to calculate gradients.
          inputs: FloatTensor of shape (F, D), representing the packed batch tensor.
              e.g. areas for faces in a batch of meshes.
          first_idxs: LongTensor of shape (N,) where N is the number of
              elements in the batch and `first_idxs[i] = f`
              means that the inputs for batch element i begin at `inputs[f]`.
          max_size: Max length of an element in the batch.
  
      Returns:
          inputs_padded: FloatTensor of shape (N, max_size, D) where max_size is max
              of `sizes`. The values for batch element i which start at
              `inputs[first_idxs[i]]` will be copied to `inputs_padded[i, :]`,
              with zeros padding out the extra inputs.
      """
      if not (inputs.dim() == 2):
          raise ValueError("input can only be 2-dimensional.")
      if not (first_idxs.dim() == 1):
          raise ValueError("first_idxs can only be 1-dimensional.")
      if not (inputs.dtype == torch.float32):
          raise ValueError("input has to be of type torch.float32.")
      if not (first_idxs.dtype == torch.int64):
          raise ValueError("first_idxs has to be of type torch.int64.")
      if not isinstance(max_size, int):
          raise ValueError("max_size has to be int.")
  
      ctx.save_for_backward(first_idxs)
      ctx.num_inputs = int(inputs.shape[0])
      inputs, first_idxs = inputs.contiguous(), first_idxs.contiguous()
      inputs_padded = _C.packed_to_padded(inputs, first_idxs, max_size)
      return inputs_padded
  
file_path: pytorch3d/pytorch3d/ops/packed_to_padded.py
imports: import torch
  from pytorch3d import _C
  from torch.autograd import Function
  from torch.autograd.function import once_differentiable
label_desc: Use image node_id 1 for calling the _PackedToPadded obj's underlying member method code with example usage: obj.forward(ctx, inputs, first_idxs, max_size) and returns: inputs_padded