class_docstr: Deserialize stream to torch.Tensor.
  
  Args:
      stream (botocore.response.StreamingBody): Data to be deserialized.
      content_type (str): The MIME type of the data.
  
  Returns:
      torch.Tensor: The data deserialized into a torch Tensor.
class_docstr_tok: ["Deserialize","stream","to","torch.Tensor",".","Args",":","stream","(","botocore.response.StreamingBody",")",":","Data","to","be","deserialized",".","content_type","(","str",")",":","The","MIME","type","of","the","data",".","Returns",":","torch.Tensor",":","The","data","deserialized","into","a","torch","Tensor","."]
code: def __init__(self, accept="tensor/pt"):
      super(TorchTensorDeserializer, self).__init__(accept=accept)
      self.numpy_deserializer = NumpyDeserializer()
      try:
          from torch import from_numpy
  
          self.convert_npy_to_tensor = from_numpy
      except ImportError:
          raise Exception("Unable to import pytorch.")
  
imports: from __future__ import absolute_import
  import csv
  import abc
  import codecs
  import io
  import json
  import numpy
  from six import with_metaclass
  from sagemaker.utils import DeferredError
label_desc: Use image node_id 1 to create a new TorchTensorDeserializer object from inherited base classes: SimpleBaseDeserializer with example: obj = TorchTensorDeserializer(accept)