class_docstr: Initializer that generates tensors initialized to the given value.
class_docstr_tok: ["Initializer","that","generates","tensors","initialized","to","the","given","value","."]
code: def __init__(self, value: Union[float, int]):
      if not np.isscalar(value):
          raise TypeError(
              "Invalid type for value: {} (expected scalar).".format(
                  type(value)
              )
          )
      self.value = value
  
imports: import abc
  import collections
  from typing import Iterable, Mapping, Optional, Union
  import numpy
  from sonnet.src import types
  import tensorflow
label_desc: Use image node_id 1 to create a new Constant object from inherited base classes: Initializer with example: obj = Constant(value)