Skip to content
Merged
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
1 change: 1 addition & 0 deletions tensorflow_addons/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
from tensorflow_addons import seq2seq
from tensorflow_addons import text
from tensorflow_addons.register import register_all
from tensorflow_addons.utils import types

from tensorflow_addons.version import __version__
3 changes: 3 additions & 0 deletions tensorflow_addons/image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
from tensorflow_addons.image.transform_ops import shear_x
from tensorflow_addons.image.transform_ops import shear_y
from tensorflow_addons.image.sparse_image_warp import sparse_image_warp
from tensorflow_addons.image.transform_ops import compose_transforms
from tensorflow_addons.image.transform_ops import angles_to_projective_transforms
from tensorflow_addons.image.transform_ops import transform
from tensorflow_addons.image.translate_ops import translate
from tensorflow_addons.image.translate_ops import translate_xy
from tensorflow_addons.image.translate_ops import translations_to_projective_transforms
6 changes: 5 additions & 1 deletion tensorflow_addons/metrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@

from tensorflow_addons.metrics.cohens_kappa import CohenKappa
from tensorflow_addons.metrics.f_scores import F1Score, FBetaScore
from tensorflow_addons.metrics.hamming import HammingLoss, hamming_distance
from tensorflow_addons.metrics.hamming import (
HammingLoss,
hamming_distance,
hamming_loss_fn,
)
from tensorflow_addons.metrics.utils import MeanMetricWrapper
from tensorflow_addons.metrics.matthews_correlation_coefficient import (
MatthewsCorrelationCoefficient,
Expand Down
3 changes: 3 additions & 0 deletions tensorflow_addons/optimizers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@
from tensorflow_addons.optimizers.weight_decay_optimizers import (
extend_with_decoupled_weight_decay,
)
from tensorflow_addons.optimizers.weight_decay_optimizers import (
DecoupledWeightDecayExtension,
)
from tensorflow_addons.optimizers.yogi import Yogi
2 changes: 2 additions & 0 deletions tensorflow_addons/text/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"""Additional text-processing ops."""

# Conditional Random Field
from tensorflow_addons.text import crf
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will generate a page like

<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tfa.text.crf" />
<meta itemprop="path" content="Stable" />
</div>

# Module: tfa.text.crf

<!-- Insert buttons and diff -->

<table class="tfo-notebook-buttons tfo-api nocontent" align="left">
<td>
  <a target="_blank" href="https://github.com/tensorflow/addons/tree/doc/expose-types-doc/tensorflow_addons/text/crf.py">
    <img src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" />
    View source on GitHub
  </a>
</td>
</table>







## Classes

[`class CrfDecodeForwardRnnCell`](../../tfa/text/CrfDecodeForwardRnnCell.md): Computes the forward decoding in a linear-chain CRF.

## Functions

[`crf_binary_score(...)`](../../tfa/text/crf_binary_score.md): Computes the binary scores of tag sequences.

[`crf_constrained_decode(...)`](../../tfa/text/crf_constrained_decode.md): Decode the highest scoring sequence of tags under constraints.

[`crf_decode(...)`](../../tfa/text/crf_decode.md): Decode the highest scoring sequence of tags.

[`crf_decode_backward(...)`](../../tfa/text/crf_decode_backward.md): Computes backward decoding in a linear-chain CRF.

[`crf_decode_forward(...)`](../../tfa/text/crf_decode_forward.md): Computes forward decoding in a linear-chain CRF.

[`crf_filtered_inputs(...)`](../../tfa/text/crf_filtered_inputs.md): Constrains the inputs to filter out certain tags at each time step.

[`crf_forward(...)`](../../tfa/text/crf_forward.md): Computes the alpha values in a linear-chain CRF.

[`crf_log_likelihood(...)`](../../tfa/text/crf_log_likelihood.md): Computes the log-likelihood of tag sequences in a CRF.

[`crf_log_norm(...)`](../../tfa/text/crf_log_norm.md): Computes the normalization for a CRF.

[`crf_multitag_sequence_score(...)`](../../tfa/text/crf_multitag_sequence_score.md): Computes the unnormalized score of all tag sequences matching

[`crf_sequence_score(...)`](../../tfa/text/crf_sequence_score.md): Computes the unnormalized score for a tag sequence.

[`crf_unary_score(...)`](../../tfa/text/crf_unary_score.md): Computes the unary scores of tag sequences.

[`viterbi_decode(...)`](../../tfa/text/viterbi_decode.md): Decode the highest scoring sequence of tags outside of TensorFlow.

## Type Aliases

[`TensorLike`](../../tfa/types/TensorLike.md): The central part of internal API.

which redirects APIs to lower page tfa.text.*.

Note that even if we do not import APIs in __init__.py, the users can still access it as usual. This is just for better look of API pages.

from tensorflow_addons.text.crf import CrfDecodeForwardRnnCell
from tensorflow_addons.text.crf import crf_binary_score
from tensorflow_addons.text.crf import crf_constrained_decode
from tensorflow_addons.text.crf import crf_decode
Expand Down
7 changes: 5 additions & 2 deletions tools/docs/build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ def main(argv):
py_modules=[(PROJECT_SHORT_NAME, tfa)],
code_url_prefix=code_url_prefix,
private_map={"tfa": ["__version__", "utils", "version"]},
# This callback usually cleans up a lot of aliases caused by internal imports.
callbacks=[public_api.local_definitions_filter],
# These callbacks usually clean up a lot of aliases caused by internal imports.
callbacks=[
public_api.local_definitions_filter,
public_api.explicit_package_contents_filter,
],
search_hints=FLAGS.search_hints,
site_path=FLAGS.site_path,
)
Expand Down
2 changes: 1 addition & 1 deletion tools/install_deps/doc_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
git+https://github.com/tensorflow/docs@8192df1
git+https://github.com/tensorflow/docs
pyyaml