Skip to content

Commit 430d151

Browse files
committed
updated imports
1 parent af490be commit 430d151

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

tensorflow_probability/python/experimental/bijectors/BUILD

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,22 @@ multi_substrate_py_library(
109109
srcs = ["highway_flow.py"],
110110
srcs_version = "PY3",
111111
deps = [
112-
":scalar_function_with_inferred_inverse",
113-
# numpy dep,
114112
# tensorflow dep,
115-
"//tensorflow_probability/python/bijectors",
116-
"//tensorflow_probability/python/util",
113+
"//tensorflow_probability/python/bijectors:bijector",
114+
"//tensorflow_probability/python/bijectors:chain",
115+
"//tensorflow_probability/python/bijectors:fill_scale_tril",
116+
"//tensorflow_probability/python/bijectors:fill_triangular",
117+
"//tensorflow_probability/python/bijectors:pad",
118+
"//tensorflow_probability/python/bijectors:shift",
119+
"//tensorflow_probability/python/bijectors:sigmoid",
120+
"//tensorflow_probability/python/bijectors:softplus",
121+
"//tensorflow_probability/python/bijectors:transform_diagonal",
122+
"//tensorflow_probability/python/internal:cache_util",
123+
"//tensorflow_probability/python/internal:dtype_util",
124+
"//tensorflow_probability/python/internal:prefer_static",
117125
"//tensorflow_probability/python/internal:samplers",
126+
"//tensorflow_probability/python/internal:tensor_util",
127+
"//tensorflow_probability/python/util",
118128
],
119129
)
120130

@@ -129,6 +139,8 @@ multi_substrate_py_test(
129139
# numpy dep
130140
# tensorflow dep,
131141
"//tensorflow_probability",
142+
"//tensorflow_probability/python/distributions:mvn_diag",
143+
"//tensorflow_probability/python/internal:samplers",
132144
"//tensorflow_probability/python/internal:test_util",
133145
],
134146
)

tensorflow_probability/python/experimental/bijectors/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
from tensorflow_probability.python.experimental.bijectors.highway_flow import HighwayFlow
2323
__all__ = [
2424
'build_highway_flow_layer',
25-
'HighwayFlow',
2625
'forward_log_det_jacobian_ratio',
26+
'HighwayFlow',
2727
'inverse_log_det_jacobian_ratio',
2828
'make_distribution_bijector',
2929
'ScalarFunctionWithInferredInverse',

tensorflow_probability/python/experimental/bijectors/highway_flow_test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
import tensorflow.compat.v2 as tf
1717

1818
import tensorflow_probability as tfp
19+
from tensorflow_probability.python.distributions import mvn_diag
1920
from tensorflow_probability.python.internal import samplers
2021
from tensorflow_probability.python.internal import test_util
2122

22-
tfb = tfp.bijectors
23-
tfd = tfp.distributions
2423

2524
@test_util.test_all_tf_execution_regimes
2625
class HighwayFlowTests(test_util.TestCase):
@@ -116,8 +115,8 @@ def testResidualFractionGradientsWithCenteredDifference(self):
116115
lower_diagonal_weights_matrix=tf.eye(width),
117116
gate_first_n=width
118117
)
119-
target = tfd.MultivariateNormalDiag(loc=tf.zeros(width),
120-
scale_diag=tf.ones(width))
118+
target = mvn_diag.MultivariateNormalDiag(loc=tf.zeros(width),
119+
scale_diag=tf.ones(width))
121120
x = tf.ones((batch_size, width))
122121
with tf.GradientTape() as g:
123122
g.watch(bijector.residual_fraction)

0 commit comments

Comments
 (0)