class_docstr: a Transformer that converts Tensor to Sample.
class_docstr_tok: ["a","Transformer","that","converts","Tensor","to","Sample","."]
code: def __init__(self, bigdl_type="float"):
      super(TensorToSample, self).__init__(bigdl_type)
  
imports: from bigdl.util.common import *
  from zoo.common.utils import callZooFunc
  from bigdl.dataset.dataset import DataSet
  from pyspark.serializers import CloudPickleSerializer
  import sys
  import math
  import warnings
label_desc: Use image node_id 1 to create a new TensorToSample object from inherited base classes: Preprocessing with example: obj = TensorToSample(bigdl_type)