Skip to content

Commit

Permalink
Bound concentration away from zero for hp testing.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 681544617
  • Loading branch information
brianwa84 authored and tensorflower-gardener committed Oct 2, 2024
1 parent ebc43b5 commit 4b8182b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def generalized_paretos(draw, batch_shape=None):
constraints = dict(
loc=tfp_hps.identity_fn,
scale=tfp_hps.softplus_plus_eps(),
concentration=lambda x: tf.math.tanh(x) * 0.24) # <.25==safe for variance
# concentration < .25 ==> safe for variance
concentration=lambda x: tf.math.tanh(x) * 0.24 + 1e-6)

params = draw(
tfp_hps.broadcasting_params(
Expand Down

0 comments on commit 4b8182b

Please sign in to comment.