class_docstr: Holds the output of the [`~SequenceFeatureExtractor.pad`] and feature extractor specific `__call__` methods.
  
  This class is derived from a python dictionary and can be used as a dictionary.
  
  Args:
      data (`dict`, *optional*):
          Dictionary of lists/arrays/tensors returned by the __call__/pad methods ('input_values', 'attention_mask',
          etc.).
      tensor_type (`Union[None, str, TensorType]`, *optional*):
          You can give a tensor_type here to convert the lists of integers in PyTorch/TensorFlow/Numpy Tensors at
          initialization.
class_docstr_tok: ["Holds","the","output","of","the","[","`","~SequenceFeatureExtractor.pad","`","]","and","feature","extractor","specific","`","__call__","`","methods",".","This","class","is","derived","from","a","python","dictionary","and","can","be","used","as","a","dictionary",".","Args",":","data","(","`","dict","`",",","*","optional","*",")",":","Dictionary","of","lists\/arrays\/tensors","returned","by","the","__call__\/pad","methods","(","'input_values","'",",","'attention_mask","'",",","etc.",")",".","tensor_type","(","`","Union","[","None",",","str",",","TensorType","]","`",",","*","optional","*",")",":","You","can","give","a","tensor_type","here","to","convert","the","lists","of","integers","in","PyTorch\/TensorFlow\/Numpy","Tensors","at","initialization","."]
docstr: Send all values to device by calling `v.to(*args, **kwargs)` (PyTorch only). This should support casting in
  different `dtypes` and sending the `BatchFeature` to a different `device`.
  
  Args:
      args (`Tuple`):
          Will be passed to the `to(...)` function of the tensors.
      kwargs (`Dict`, *optional*):
          Will be passed to the `to(...)` function of the tensors.
  
  Returns:
      [`BatchFeature`]: The same instance after modification.
docstr_tok: ["Send","all","values","to","device","by","calling","`","v.to","(","*","args",",","*","*","kwargs",")","`","(","PyTorch","only",")",".","This","should","support","casting","in","different","`","dtypes","`","and","sending","the","`","BatchFeature","`","to","a","different","`","device","`",".","Args",":","args","(","`","Tuple","`",")",":","Will","be","passed","to","the","`","to","(","...",")","`","function","of","the","tensors",".","kwargs","(","`","Dict","`",",","*","optional","*",")",":","Will","be","passed","to","the","`","to","(","...",")","`","function","of","the","tensors",".","Returns",":","[","`","BatchFeature","`","]",":","The","same","instance","after","modification","."]
code: def to(self, *args, **kwargs) -> "BatchFeature":
      """
      Send all values to device by calling `v.to(*args, **kwargs)` (PyTorch only). This should support casting in
      different `dtypes` and sending the `BatchFeature` to a different `device`.
  
      Args:
          args (`Tuple`):
              Will be passed to the `to(...)` function of the tensors.
          kwargs (`Dict`, *optional*):
              Will be passed to the `to(...)` function of the tensors.
  
      Returns:
          [`BatchFeature`]: The same instance after modification.
      """
      requires_backends(self, ["torch"])
      import torch  # noqa
  
      new_data = {}
      device = kwargs.get("device")
      # Check if the args are a device or a dtype
      if device is None and len(args) > 0:
          # device should be always the first argument
          arg = args[0]
          if is_torch_dtype(arg):
              # The first argument is a dtype
              pass
          elif (
              isinstance(arg, str)
              or is_torch_device(arg)
              or isinstance(arg, int)
          ):
              device = arg
          else:
              # it's something else
              raise ValueError(
                  f"Attempting to cast a BatchFeature to type {str(arg)}. This is not supported."
              )
      # We cast only floating point tensors to avoid issues with tokenizers casting `LongTensor` to `FloatTensor`
      for k, v in self.items():
          # check if v is a floating point
          if torch.is_floating_point(v):
              # cast and send to device
              new_data[k] = v.to(*args, **kwargs)
          elif device is not None:
              new_data[k] = v.to(device=device)
          else:
              new_data[k] = v
      self.data = new_data
      return self
  
imports: import copy
  import json
  import os
  import warnings
  from collections import UserDict
  from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Union
  import numpy
  from .dynamic_module_utils import custom_object_save
  from .utils import FEATURE_EXTRACTOR_NAME, PushToHubMixin, TensorType, add_model_info_to_auto_map, cached_file, copy_func, download_url, is_flax_available, is_jax_tensor, is_numpy_array, is_offline_mode, is_remote_url, is_tf_available, is_torch_available, is_torch_device, is_torch_dtype, logging, requires_backends
label_desc: Use image node_id 11 for calling the BatchFeature obj's underlying member method code with example usage: obj.to() and returns: self