Skip to content

Commit 84f1c13

Browse files
SiegeLordExtensorflower-gardener
authored andcommitted
Add LinearOperatorInterpolatedPSDKernel.
Also yak-shave a few underlying things. PiperOrigin-RevId: 462717132
1 parent 2e21816 commit 84f1c13

File tree

6 files changed

+860
-4
lines changed

6 files changed

+860
-4
lines changed

tensorflow_probability/python/experimental/linalg/BUILD

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,52 @@ package(
3232
multi_substrate_py_library(
3333
name = "linalg",
3434
srcs = ["__init__.py"],
35+
numpy_omit_deps = [
36+
":linear_operator_interpolated_psd_kernel",
37+
],
3538
substrates_omit_deps = [
3639
":linear_operator_psd_kernel",
3740
":no_pivot_ldl",
3841
],
3942
deps = [
43+
":linear_operator_interpolated_psd_kernel",
4044
":linear_operator_psd_kernel",
4145
":linear_operator_unitary",
4246
":no_pivot_ldl",
4347
"//tensorflow_probability/python/internal:all_util",
4448
],
4549
)
4650

51+
multi_substrate_py_library(
52+
name = "linear_operator_interpolated_psd_kernel",
53+
srcs = ["linear_operator_interpolated_psd_kernel.py"],
54+
deps = [
55+
# numpy dep,
56+
# tensorflow dep,
57+
"//tensorflow_probability/python/internal:distribution_util",
58+
"//tensorflow_probability/python/internal:dtype_util",
59+
"//tensorflow_probability/python/internal:prefer_static",
60+
"//tensorflow_probability/python/internal:tensor_util",
61+
"//tensorflow_probability/python/math:gradient",
62+
"//tensorflow_probability/python/math:interpolation",
63+
],
64+
)
65+
66+
multi_substrate_py_test(
67+
name = "linear_operator_interpolated_psd_kernel_test",
68+
size = "large",
69+
srcs = ["linear_operator_interpolated_psd_kernel_test.py"],
70+
disabled_substrates = ["numpy"],
71+
shard_count = 8,
72+
deps = [
73+
# numpy dep,
74+
# tensorflow dep,
75+
"//tensorflow_probability",
76+
"//tensorflow_probability/python/internal:test_util",
77+
# tensorflow/compiler/jit dep,
78+
],
79+
)
80+
4781
py_library(
4882
name = "linear_operator_psd_kernel",
4983
srcs = ["linear_operator_psd_kernel.py"],

tensorflow_probability/python/experimental/linalg/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# ============================================================================
1515
"""Experimental tools for linear algebra."""
1616

17+
from tensorflow_probability.python.experimental.linalg.linear_operator_interpolated_psd_kernel import LinearOperatorInterpolatedPSDKernel
1718
from tensorflow_probability.python.experimental.linalg.linear_operator_psd_kernel import LinearOperatorPSDKernel
1819
from tensorflow_probability.python.experimental.linalg.linear_operator_unitary import LinearOperatorUnitary
1920
from tensorflow_probability.python.experimental.linalg.no_pivot_ldl import no_pivot_ldl
@@ -22,6 +23,7 @@
2223

2324

2425
_allowed_symbols = [
26+
'LinearOperatorInterpolatedPSDKernel',
2527
'LinearOperatorPSDKernel',
2628
'LinearOperatorUnitary',
2729
'no_pivot_ldl',

0 commit comments

Comments
 (0)