original_docstring: Compute log-likelihood from samples.
          Args:
              samples: tf.Tensor, [tf.float32; [B, ...]], sample.
          Returns:
              tf.Tensor, [tf.float32; [B]], log-likelihood.
          
docstring: Compute log-likelihood from samples.
docstring_tokens: Compute log - likelihood from samples .
code: def log_prob(self, samples):
          """Compute log-likelihood from samples.
          Args:
              samples: tf.Tensor, [tf.float32; [B, ...]], sample.
          Returns:
              tf.Tensor, [tf.float32; [B]], log-likelihood.
          """
          lb = tf.cast(self.min <= samples, tf.float32)
          ub = tf.cast(self.max > samples, tf.float32)
          return sum_except_batch(
              tf.math.log(lb * ub) - tf.math.log(self.max - self.min))
code_tokens: def log_prob ( self , samples ) : lb = tf . cast ( self . min <= samples , tf . float32 ) ub = tf . cast ( self . max > samples , tf . float32 ) return sum_except_batch ( tf . math . log ( lb * ub ) - tf . math . log ( self . max - self . min ) )
short_docstring: Compute log-likelihood from samples.
short_docstring_tokens: Compute log - likelihood from samples .
comment: """Compute log-likelihood from samples.
          Args:
              samples: tf.Tensor, [tf.float32; [B, ...]], sample.
          Returns:
              tf.Tensor, [tf.float32; [B]], log-likelihood.
          """