class_docstr: The "sinusoid": P(t) = sin(2pi(t+V)), where V is uniform over [0,1].
class_docstr_tok: ["The","``","sinusoid","''",":","P","(","t",")","=","sin","(","2pi","(","t+V",")",")",",","where","V","is","uniform","over","[","0,1","]","."]
docstr: Initializer.
  
  Args:
    index_points: 1-D `Tensor` representing the locations at which to
      evaluate the process. The intent is that all locations are in [0,1],
      but the process has a natural extrapolation outside this range so no
      error is thrown.
    phase: Float in [0,1] or `None` (default). Specifies realization of V.
    dtype: Data type of the returned realization at each timestep. Defaults
      to tf.float32.
    validate_args: required by tensorflow Distribution class but unused.
    allow_nan_stats: required by tensorflow Distribution class but unused.
    name: String. Name of the created object.
docstr_tok: ["Initializer",".","Args",":","index_points",":","1-D","`","Tensor","`","representing","the","locations","at","which","to","evaluate","the","process",".","The","intent","is","that","all","locations","are","in","[","0,1","]",",","but","the","process","has","a","natural","extrapolation","outside","this","range","so","no","error","is","thrown",".","phase",":","Float","in","[","0,1","]","or","`","None","`","(","default",")",".","Specifies","realization","of","V.","dtype",":","Data","type","of","the","returned","realization","at","each","timestep",".","Defaults","to","tf.float32",".","validate_args",":","required","by","tensorflow","Distribution","class","but","unused",".","allow_nan_stats",":","required","by","tensorflow","Distribution","class","but","unused",".","name",":","String",".","Name","of","the","created","object","."]
code: def __init__(
      self,
      index_points,
      phase=None,
      dtype=tf.float32,
      validate_args=False,
      allow_nan_stats=True,
      name="sinusoid",
  ):
      """Initializer.
  
      Args:
        index_points: 1-D `Tensor` representing the locations at which to
          evaluate the process. The intent is that all locations are in [0,1],
          but the process has a natural extrapolation outside this range so no
          error is thrown.
        phase: Float in [0,1] or `None` (default). Specifies realization of V.
        dtype: Data type of the returned realization at each timestep. Defaults
          to tf.float32.
        validate_args: required by tensorflow Distribution class but unused.
        allow_nan_stats: required by tensorflow Distribution class but unused.
        name: String. Name of the created object.
      """
      parameters = dict(locals())
      with tf.name_scope(name) as name:
          self._index_points = tf.convert_to_tensor(
              index_points, dtype_hint=dtype, name="index_points"
          )
          self._phase = phase
      super().__init__(
          dtype=dtype,
          reparameterization_type=tfp.distributions.NOT_REPARAMETERIZED,
          validate_args=validate_args,
          allow_nan_stats=allow_nan_stats,
          parameters=parameters,
          name=name,
      )
  
file_path: compression/models/toy_sources/sinusoid.py
imports: import numpy
  import tensorflow
  import tensorflow_probability
label_desc: Use image node_id 1 to create a new Sinusoid object from inherited base classes: tfp.distributions with example: obj = Sinusoid(index_points, phase, dtype, validate_args, allow_nan_stats, name)