class_docstr: Dataset class for classifiers from Pytorch Integration.
      
docstr: Calls `torch.Tensor.to` on all Tensors in `data`.
  
  Returns
  -------
  self : PytorchTextClassificationDataset
      The object with `to` having been called on all Tensors in `data`.
  
  See also
  --------
  `PyTorch Docs - torch.Tensor.to <https://pytorch.org/docs/stable/generated/torch.Tensor.to.html>`_
docstr_tok: ["Calls","`","torch.Tensor.to","`","on","all","Tensors","in","`","data","`",".","Returns","--","--","--","-","self",":","PytorchTextClassificationDataset","The","object","with","`","to","`","having","been","called","on","all","Tensors","in","`","data","`",".","See","also","--","--","--","--","`","PyTorch","Docs","-","torch.Tensor.to","<","https",":","\/\/pytorch.org\/docs\/stable\/generated\/torch.Tensor.to.html",">","`","_"]
code: def to(self, other, non_blocking=False, copy=False):
      """Calls `torch.Tensor.to` on all Tensors in `data`.
  
      Returns
      -------
      self : PytorchTextClassificationDataset
          The object with `to` having been called on all Tensors in `data`.
  
      See also
      --------
      `PyTorch Docs - torch.Tensor.to <https://pytorch.org/docs/stable/generated/torch.Tensor.to.html>`_
      """
      data = [
          (
              d[self.INDEX_TEXT].to(
                  other, non_blocking=non_blocking, copy=copy
              ),
              d[self.INDEX_LABEL],
          )
          for d in self._data
      ]
  
      if copy is True:
          import copy
  
          target_labels = (
              None if self.track_target_labels else self._target_labels
          )
          vocab = copy.deepcopy(self._vocab)
          return PytorchTextClassificationDataset(
              data, vocab, target_labels=target_labels
          )
      else:
          self._data = data
          return self
  
imports: import torch
  import numpy
  from abc import ABC, abstractmethod
  from scipy.sparse import csr_matrix
  from small_text.base import LABEL_UNLABELED
  from small_text.data import DatasetView
  from small_text.data.datasets import check_size, check_target_labels, get_updated_target_labels
  from small_text.data.exceptions import UnsupportedOperationException
  from small_text.utils.annotations import experimental
  from small_text.utils.labels import csr_to_list, get_num_labels, list_to_csr
label_desc: Use image node_id 14 for calling the PytorchTextClassificationDataset obj's underlying member method code with example usage: obj.to(other, non_blocking, copy) and returns: PytorchTextClassificationDataset, self