Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions tensorflow_probability/python/distributions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2109,6 +2109,29 @@ multi_substrate_py_library(
],
)

multi_substrate_py_library(
name = "skew_generalized_normal",
srcs = ["skew_generalized_normal.py"],
deps = [
":distribution",
# numpy dep,
# tensorflow dep,
"//tensorflow_probability/python/bijectors:chain",
"//tensorflow_probability/python/bijectors:exp",
"//tensorflow_probability/python/bijectors:scale",
"//tensorflow_probability/python/bijectors:shift",
"//tensorflow_probability/python/bijectors:softplus",
"//tensorflow_probability/python/internal:assert_util",
"//tensorflow_probability/python/internal:dtype_util",
"//tensorflow_probability/python/internal:parameter_properties",
"//tensorflow_probability/python/internal:prefer_static",
"//tensorflow_probability/python/internal:reparameterization",
"//tensorflow_probability/python/internal:samplers",
"//tensorflow_probability/python/internal:special_math",
"//tensorflow_probability/python/internal:tensor_util",
],
)

multi_substrate_py_library(
name = "stopping_ratio_logistic",
srcs = ["stopping_ratio_logistic.py"],
Expand Down Expand Up @@ -4458,6 +4481,21 @@ multi_substrate_py_test(
],
)

multi_substrate_py_test(
name = "skew_generalized_normal_test",
size = "medium",
srcs = ["skew_generalized_normal_test.py"],
shard_count = 3,
deps = [
":skew_generalized_normal",
# numpy dep,
# scipy dep,
# tensorflow dep,
"//tensorflow_probability/python/internal:test_util",
"//tensorflow_probability/python/math:gradient",
],
)

multi_substrate_py_test(
name = "stopping_ratio_logistic_test",
srcs = ["stopping_ratio_logistic_test.py"],
Expand Down
2 changes: 2 additions & 0 deletions tensorflow_probability/python/distributions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
from tensorflow_probability.python.distributions.sigmoid_beta import SigmoidBeta
from tensorflow_probability.python.distributions.sinh_arcsinh import SinhArcsinh
from tensorflow_probability.python.distributions.skellam import Skellam
from tensorflow_probability.python.distributions.skew_generalized_normal import SkewGeneralizedNormal
from tensorflow_probability.python.distributions.spherical_uniform import SphericalUniform
from tensorflow_probability.python.distributions.stopping_ratio_logistic import StoppingRatioLogistic
from tensorflow_probability.python.distributions.student_t import StudentT
Expand Down Expand Up @@ -282,6 +283,7 @@
'SigmoidBeta',
'SinhArcsinh',
'Skellam',
'SkewGeneralizedNormal',
'SphericalUniform',
'StoppingRatioLogistic',
'StudentT',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ def fix_bates(d):
'Zipf': lambda d: dict(d, dtype=tf.float32),
'FiniteDiscrete': fix_finite_discrete,
'GeneralizedNormal.power': tfp_hps.softplus_plus_eps(),
'SkewGeneralizedNormal.peak': tfp_hps.softplus_plus_eps(1e-1),
'TwoPieceNormal.skewness': tfp_hps.softplus_plus_eps(),
'TwoPieceStudentT.skewness': tfp_hps.softplus_plus_eps(),
'NoncentralChi2.noncentrality': tf.math.softplus,
Expand Down
Loading