コード例 #1
0
 def get_log_probs(
     self,
     x,
     *inputs,
     **kwargs
 ):
     x = tf.clip_by_value(x, -0.999, 0.999)
     correction = -1.0 * tf.reduce_sum(tf.math.log(1.0 - tf.math.square(x)), axis=-1)
     return correction + Gaussian.get_log_probs(
         self, tf.math.atanh(x), *inputs, **kwargs)
コード例 #2
0
 def get_log_probs(self, x, *inputs, **kwargs):
     x = tf.maximum(x, 0.001)
     correction = -1.0 * tf.reduce_sum(x, axis=-1)
     return correction + Gaussian.get_log_probs(self, tf.math.log(x), *
                                                inputs, **kwargs)