class_docstr: A data decoder that decodes a scalar, e.g., int label or float number.
  
  The only operation is to cast the data into a specified data type.
  
  Args:
      dtype: A :tf_main:`tf DType <DType>` that data is cast into. Can be
          `tf.int32` or `tf.float32`.
      data_name (str): Name of the decoded data.
class_docstr_tok: ["A","data","decoder","that","decodes","a","scalar",",","e.g.",",","int","label","or","float","number",".","The","only","operation","is","to","cast","the","data","into","a","specified","data","type",".","Args",":","dtype",":","A",":","tf_main",":","`","tf","DType","<","DType",">","`","that","data","is","cast","into",".","Can","be","`","tf.int32","`","or","`","tf.float32","`",".","data_name","(","str",")",":","Name","of","the","decoded","data","."]
code: def __init__(self, dtype=tf.int32, data_name="data"):
      self._dtype = dtype
      self._data_name = data_name
      if self._data_name is None:
          self._data_name = "data"
  
imports: import numpy
  import tensorflow
  from tensorflow.contrib.slim.python.slim.data import data_decoder
  from texar.tf.data.vocabulary import SpecialTokens
  from texar.tf.utils import dtypes
  from texar.tf.hyperparams import HParams
label_desc: Use image node_id 1 to create a new ScalarDataDecoder object from inherited base classes: data_decoder with example: obj = ScalarDataDecoder(dtype, data_name)