Skip to content

Commit 3aee283

Browse files
author
jballe
committed
Namespace cleanup.
PiperOrigin-RevId: 242989394
1 parent 0e46883 commit 3aee283

23 files changed

+61
-312
lines changed

BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ py_library(
3737
"python/layers/parameterizers.py",
3838
"python/layers/signal_conv.py",
3939
"python/ops/__init__.py",
40+
"python/ops/_namespace_helper.py",
4041
"python/ops/math_ops.py",
4142
"python/ops/padding_ops.py",
4243
"python/ops/range_coding_ops.py",

__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
# ==============================================================================
1515
"""Data compression tools."""
1616

17-
from __future__ import absolute_import
18-
from __future__ import division
19-
from __future__ import print_function
20-
21-
# Dependency imports
17+
from __future__ import absolute_import as _absolute_import
18+
from __future__ import division as _division
19+
from __future__ import print_function as _print_function
2220

2321
# pylint: disable=wildcard-import
2422
from tensorflow_compression.python.layers.entropy_models import *

docs/api_docs/python/index.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@
1717
* <a href="./tfc/StaticParameterizer.md"><code>tfc.StaticParameterizer</code></a>
1818
* <a href="./tfc/SymmetricConditional.md"><code>tfc.SymmetricConditional</code></a>
1919
* <a href="./tfc/array_fingerprint.md"><code>tfc.array_fingerprint</code></a>
20-
* <a href="./tfc/array_fingerprint_eager_fallback.md"><code>tfc.array_fingerprint_eager_fallback</code></a>
2120
* <a href="./tfc/check_array_fingerprint.md"><code>tfc.check_array_fingerprint</code></a>
22-
* <a href="./tfc/check_array_fingerprint_eager_fallback.md"><code>tfc.check_array_fingerprint_eager_fallback</code></a>
23-
* <a href="./tfc/deprecated_endpoints.md"><code>tfc.deprecated_endpoints</code></a>
2421
* <a href="./tfc/irdft_matrix.md"><code>tfc.irdft_matrix</code></a>
2522
* <a href="./tfc/lower_bound.md"><code>tfc.lower_bound</code></a>
2623
* <a href="./tfc/pmf_to_quantized_cdf.md"><code>tfc.pmf_to_quantized_cdf</code></a>
27-
* <a href="./tfc/pmf_to_quantized_cdf_eager_fallback.md"><code>tfc.pmf_to_quantized_cdf_eager_fallback</code></a>
2824
* <a href="./tfc/python.md"><code>tfc.python</code></a>
2925
* <a href="./tfc/python/layers.md"><code>tfc.python.layers</code></a>
3026
* <a href="./tfc/python/layers/entropy_models.md"><code>tfc.python.layers.entropy_models</code></a>
@@ -55,29 +51,17 @@
5551
* <a href="./tfc/same_padding_for_kernel.md"><code>tfc.python.ops.padding_ops.same_padding_for_kernel</code></a>
5652
* <a href="./tfc/python/ops/range_coding_ops.md"><code>tfc.python.ops.range_coding_ops</code></a>
5753
* <a href="./tfc/array_fingerprint.md"><code>tfc.python.ops.range_coding_ops.array_fingerprint</code></a>
58-
* <a href="./tfc/array_fingerprint_eager_fallback.md"><code>tfc.python.ops.range_coding_ops.array_fingerprint_eager_fallback</code></a>
5954
* <a href="./tfc/check_array_fingerprint.md"><code>tfc.python.ops.range_coding_ops.check_array_fingerprint</code></a>
60-
* <a href="./tfc/check_array_fingerprint_eager_fallback.md"><code>tfc.python.ops.range_coding_ops.check_array_fingerprint_eager_fallback</code></a>
61-
* <a href="./tfc/deprecated_endpoints.md"><code>tfc.python.ops.range_coding_ops.deprecated_endpoints</code></a>
6255
* <a href="./tfc/pmf_to_quantized_cdf.md"><code>tfc.python.ops.range_coding_ops.pmf_to_quantized_cdf</code></a>
63-
* <a href="./tfc/pmf_to_quantized_cdf_eager_fallback.md"><code>tfc.python.ops.range_coding_ops.pmf_to_quantized_cdf_eager_fallback</code></a>
6456
* <a href="./tfc/range_decode.md"><code>tfc.python.ops.range_coding_ops.range_decode</code></a>
65-
* <a href="./tfc/range_decode_eager_fallback.md"><code>tfc.python.ops.range_coding_ops.range_decode_eager_fallback</code></a>
6657
* <a href="./tfc/range_encode.md"><code>tfc.python.ops.range_coding_ops.range_encode</code></a>
67-
* <a href="./tfc/range_encode_eager_fallback.md"><code>tfc.python.ops.range_coding_ops.range_encode_eager_fallback</code></a>
6858
* <a href="./tfc/unbounded_index_range_decode.md"><code>tfc.python.ops.range_coding_ops.unbounded_index_range_decode</code></a>
69-
* <a href="./tfc/unbounded_index_range_decode_eager_fallback.md"><code>tfc.python.ops.range_coding_ops.unbounded_index_range_decode_eager_fallback</code></a>
7059
* <a href="./tfc/unbounded_index_range_encode.md"><code>tfc.python.ops.range_coding_ops.unbounded_index_range_encode</code></a>
71-
* <a href="./tfc/unbounded_index_range_encode_eager_fallback.md"><code>tfc.python.ops.range_coding_ops.unbounded_index_range_encode_eager_fallback</code></a>
7260
* <a href="./tfc/python/ops/spectral_ops.md"><code>tfc.python.ops.spectral_ops</code></a>
7361
* <a href="./tfc/irdft_matrix.md"><code>tfc.python.ops.spectral_ops.irdft_matrix</code></a>
7462
* <a href="./tfc/range_decode.md"><code>tfc.range_decode</code></a>
75-
* <a href="./tfc/range_decode_eager_fallback.md"><code>tfc.range_decode_eager_fallback</code></a>
7663
* <a href="./tfc/range_encode.md"><code>tfc.range_encode</code></a>
77-
* <a href="./tfc/range_encode_eager_fallback.md"><code>tfc.range_encode_eager_fallback</code></a>
7864
* <a href="./tfc/same_padding_for_kernel.md"><code>tfc.same_padding_for_kernel</code></a>
7965
* <a href="./tfc/unbounded_index_range_decode.md"><code>tfc.unbounded_index_range_decode</code></a>
80-
* <a href="./tfc/unbounded_index_range_decode_eager_fallback.md"><code>tfc.unbounded_index_range_decode_eager_fallback</code></a>
8166
* <a href="./tfc/unbounded_index_range_encode.md"><code>tfc.unbounded_index_range_encode</code></a>
82-
* <a href="./tfc/unbounded_index_range_encode_eager_fallback.md"><code>tfc.unbounded_index_range_encode_eager_fallback</code></a>
8367
* <a href="./tfc/upper_bound.md"><code>tfc.upper_bound</code></a>

docs/api_docs/python/tfc.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,49 +49,23 @@ Data compression tools.
4949

5050
[`array_fingerprint(...)`](./tfc/array_fingerprint.md): Produces fingerprint of the input data.
5151

52-
[`array_fingerprint_eager_fallback(...)`](./tfc/array_fingerprint_eager_fallback.md): This is the slowpath function for Eager mode.
53-
5452
[`check_array_fingerprint(...)`](./tfc/check_array_fingerprint.md): Computes the fingerprint of `input` and checks the computed value against
5553

56-
[`check_array_fingerprint_eager_fallback(...)`](./tfc/check_array_fingerprint_eager_fallback.md): This is the slowpath function for Eager mode.
57-
58-
[`deprecated_endpoints(...)`](./tfc/deprecated_endpoints.md): Decorator for marking endpoints deprecated.
59-
6054
[`irdft_matrix(...)`](./tfc/irdft_matrix.md): Matrix for implementing kernel reparameterization with `tf.matmul`.
6155

6256
[`lower_bound(...)`](./tfc/lower_bound.md): Same as `tf.maximum`, but with helpful gradient for `inputs < bound`.
6357

6458
[`pmf_to_quantized_cdf(...)`](./tfc/pmf_to_quantized_cdf.md): Converts PMF to quantized CDF. This op uses floating-point operations
6559

66-
[`pmf_to_quantized_cdf_eager_fallback(...)`](./tfc/pmf_to_quantized_cdf_eager_fallback.md): This is the slowpath function for Eager mode.
67-
6860
[`range_decode(...)`](./tfc/range_decode.md): Decodes a range-coded `code` into an int32 tensor of shape `shape`.
6961

70-
[`range_decode_eager_fallback(...)`](./tfc/range_decode_eager_fallback.md): This is the slowpath function for Eager mode.
71-
7262
[`range_encode(...)`](./tfc/range_encode.md): Using the provided cumulative distribution functions (CDF) inside `cdf`, returns
7363

74-
[`range_encode_eager_fallback(...)`](./tfc/range_encode_eager_fallback.md): This is the slowpath function for Eager mode.
75-
7664
[`same_padding_for_kernel(...)`](./tfc/same_padding_for_kernel.md): Determine correct amount of padding for `same` convolution.
7765

7866
[`unbounded_index_range_decode(...)`](./tfc/unbounded_index_range_decode.md): This is the reverse op of `UnboundedIndexRangeEncode`, and decodes the range
7967

80-
[`unbounded_index_range_decode_eager_fallback(...)`](./tfc/unbounded_index_range_decode_eager_fallback.md): This is the slowpath function for Eager mode.
81-
8268
[`unbounded_index_range_encode(...)`](./tfc/unbounded_index_range_encode.md): Range encodes unbounded integer `data` using an indexed probability table.
8369

84-
[`unbounded_index_range_encode_eager_fallback(...)`](./tfc/unbounded_index_range_encode_eager_fallback.md): This is the slowpath function for Eager mode.
85-
8670
[`upper_bound(...)`](./tfc/upper_bound.md): Same as `tf.minimum`, but with helpful gradient for `inputs > bound`.
8771

88-
## Other Members
89-
90-
<h3 id="absolute_import"><code>absolute_import</code></h3>
91-
92-
<h3 id="division"><code>division</code></h3>
93-
94-
<h3 id="print_function"><code>print_function</code></h3>
95-
96-
<h3 id="tf_export"><code>tf_export</code></h3>
97-

docs/api_docs/python/tfc/array_fingerprint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tfc.array_fingerprint(
1515

1616

1717

18-
Defined in [`python/ops/range_coding_ops.py`](https://github.com/tensorflow/compression/tree/master/python/ops/range_coding_ops.py).
18+
Defined in [`python/ops/_range_coding_ops.py`](https://github.com/tensorflow/compression/tree/master/python/ops/_range_coding_ops.py).
1919

2020
<!-- Placeholder for "Used in" -->
2121

docs/api_docs/python/tfc/array_fingerprint_eager_fallback.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/api_docs/python/tfc/check_array_fingerprint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ tfc.check_array_fingerprint(
1616

1717

1818

19-
Defined in [`python/ops/range_coding_ops.py`](https://github.com/tensorflow/compression/tree/master/python/ops/range_coding_ops.py).
19+
Defined in [`python/ops/_range_coding_ops.py`](https://github.com/tensorflow/compression/tree/master/python/ops/_range_coding_ops.py).
2020

2121
<!-- Placeholder for "Used in" -->
2222

docs/api_docs/python/tfc/check_array_fingerprint_eager_fallback.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

docs/api_docs/python/tfc/deprecated_endpoints.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/api_docs/python/tfc/pmf_to_quantized_cdf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ tfc.pmf_to_quantized_cdf(
1616

1717

1818

19-
Defined in [`python/ops/range_coding_ops.py`](https://github.com/tensorflow/compression/tree/master/python/ops/range_coding_ops.py).
19+
Defined in [`python/ops/_range_coding_ops.py`](https://github.com/tensorflow/compression/tree/master/python/ops/_range_coding_ops.py).
2020

2121
<!-- Placeholder for "Used in" -->
2222

0 commit comments

Comments
 (0)