diff --git a/build_deps/requirements.txt b/build_deps/requirements.txt
index 06d638f3b3..38f2f073aa 100644
--- a/build_deps/requirements.txt
+++ b/build_deps/requirements.txt
@@ -1,2 +1,2 @@
# TensorFlow greater than this date is manylinux2010 compliant
-tensorflow==2.0.0-rc0
+tensorflow==2.0.0-rc1
diff --git a/build_deps/requirements_gpu.txt b/build_deps/requirements_gpu.txt
index b003a80080..1d910e7975 100644
--- a/build_deps/requirements_gpu.txt
+++ b/build_deps/requirements_gpu.txt
@@ -1,2 +1,2 @@
# TensorFlow greater than this date is manylinux2010 compliant
-tensorflow-gpu==2.0.0-rc0
+tensorflow-gpu==2.0.0-rc1
diff --git a/docs/api_docs/python/_toc.yaml b/docs/api_docs/python/_toc.yaml
index df0bb40b4b..6c8bc16b88 100644
--- a/docs/api_docs/python/_toc.yaml
+++ b/docs/api_docs/python/_toc.yaml
@@ -1,402 +1,399 @@
-# Automatically generated file; please do not edit
toc:
- - title: tfa
- section:
- - title: Overview
- path: /api_docs/python/tfa
- - title: tfa.activations
- section:
- - title: Overview
- path: /api_docs/python/tfa/activations
- - title: gelu
- path: /api_docs/python/tfa/activations/gelu
- - title: sparsemax
- path: /api_docs/python/tfa/activations/sparsemax
- - title: tfa.callbacks
- section:
- - title: Overview
- path: /api_docs/python/tfa/callbacks
- - title: tfa.image
- section:
- - title: Overview
- path: /api_docs/python/tfa/image
- - title: adjust_hsv_in_yiq
- path: /api_docs/python/tfa/image/adjust_hsv_in_yiq
- - title: connected_components
- path: /api_docs/python/tfa/image/connected_components
- - title: dense_image_warp
- path: /api_docs/python/tfa/image/dense_image_warp
- - title: euclidean_dist_transform
- path: /api_docs/python/tfa/image/euclidean_dist_transform
- - title: interpolate_bilinear
- path: /api_docs/python/tfa/image/interpolate_bilinear
- - title: interpolate_spline
- path: /api_docs/python/tfa/image/interpolate_spline
- - title: mean_filter2d
- path: /api_docs/python/tfa/image/mean_filter2d
- - title: median_filter2d
- path: /api_docs/python/tfa/image/median_filter2d
- - title: random_hsv_in_yiq
- path: /api_docs/python/tfa/image/random_hsv_in_yiq
- - title: rotate
- path: /api_docs/python/tfa/image/rotate
- - title: sparse_image_warp
- path: /api_docs/python/tfa/image/sparse_image_warp
- - title: transform
- path: /api_docs/python/tfa/image/transform
- - title: translate
- path: /api_docs/python/tfa/image/translate
- - title: distance_transform
- section:
- - title: Overview
- path: /api_docs/python/tfa/image/distance_transform
- - title: distort_image_ops
- section:
- - title: Overview
- path: /api_docs/python/tfa/image/distort_image_ops
- - title: filters
- section:
- - title: Overview
- path: /api_docs/python/tfa/image/filters
- - title: transform_ops
- section:
- - title: Overview
- path: /api_docs/python/tfa/image/transform_ops
- - title: angles_to_projective_transforms
- path: /api_docs/python/tfa/image/transform_ops/angles_to_projective_transforms
- - title: compose_transforms
- path: /api_docs/python/tfa/image/transform_ops/compose_transforms
- - title: flat_transforms_to_matrices
- path: /api_docs/python/tfa/image/transform_ops/flat_transforms_to_matrices
- - title: matrices_to_flat_transforms
- path: /api_docs/python/tfa/image/transform_ops/matrices_to_flat_transforms
- - title: translate_ops
- section:
- - title: Overview
- path: /api_docs/python/tfa/image/translate_ops
- - title: translations_to_projective_transforms
- path: /api_docs/python/tfa/image/translate_ops/translations_to_projective_transforms
- - title: utils
- section:
- - title: Overview
- path: /api_docs/python/tfa/image/utils
- - title: from_4D_image
- path: /api_docs/python/tfa/image/utils/from_4D_image
- - title: get_ndims
- path: /api_docs/python/tfa/image/utils/get_ndims
- - title: to_4D_image
- path: /api_docs/python/tfa/image/utils/to_4D_image
- - title: tfa.layers
- section:
- - title: Overview
- path: /api_docs/python/tfa/layers
- - title: CorrelationCost
- path: /api_docs/python/tfa/layers/CorrelationCost
- - title: GeLU
- path: /api_docs/python/tfa/layers/GeLU
- - title: GroupNormalization
- path: /api_docs/python/tfa/layers/GroupNormalization
- - title: InstanceNormalization
- path: /api_docs/python/tfa/layers/InstanceNormalization
- - title: Maxout
- path: /api_docs/python/tfa/layers/Maxout
- - title: PoincareNormalize
- path: /api_docs/python/tfa/layers/PoincareNormalize
- - title: Sparsemax
- path: /api_docs/python/tfa/layers/Sparsemax
- - title: WeightNormalization
- path: /api_docs/python/tfa/layers/WeightNormalization
- - title: gelu
- section:
- - title: Overview
- path: /api_docs/python/tfa/layers/gelu
- - title: maxout
- section:
- - title: Overview
- path: /api_docs/python/tfa/layers/maxout
- - title: normalizations
- section:
- - title: Overview
- path: /api_docs/python/tfa/layers/normalizations
- - title: optical_flow
- section:
- - title: Overview
- path: /api_docs/python/tfa/layers/optical_flow
- - title: correlation_cost
- path: /api_docs/python/tfa/layers/optical_flow/correlation_cost
- - title: poincare
- section:
- - title: Overview
- path: /api_docs/python/tfa/layers/poincare
- - title: sparsemax
- section:
- - title: Overview
- path: /api_docs/python/tfa/layers/sparsemax
- - title: wrappers
- section:
- - title: Overview
- path: /api_docs/python/tfa/layers/wrappers
- - title: tfa.losses
- section:
- - title: Overview
- path: /api_docs/python/tfa/losses
- - title: ContrastiveLoss
- path: /api_docs/python/tfa/losses/ContrastiveLoss
- - title: contrastive_loss
- path: /api_docs/python/tfa/losses/contrastive_loss
- - title: LiftedStructLoss
- path: /api_docs/python/tfa/losses/LiftedStructLoss
- - title: lifted_struct_loss
- path: /api_docs/python/tfa/losses/lifted_struct_loss
- - title: NpairsLoss
- path: /api_docs/python/tfa/losses/NpairsLoss
- - title: npairs_loss
- path: /api_docs/python/tfa/losses/npairs_loss
- - title: SigmoidFocalCrossEntropy
- path: /api_docs/python/tfa/losses/SigmoidFocalCrossEntropy
- - title: sigmoid_focal_crossentropy
- path: /api_docs/python/tfa/losses/sigmoid_focal_crossentropy
- - title: SparsemaxLoss
- path: /api_docs/python/tfa/losses/SparsemaxLoss
- - title: sparsemax_loss
- path: /api_docs/python/tfa/losses/sparsemax_loss
- - title: TripletSemiHardLoss
- path: /api_docs/python/tfa/losses/TripletSemiHardLoss
- - title: triplet_semihard_loss
- path: /api_docs/python/tfa/losses/triplet_semihard_loss
- - title: contrastive
- section:
- - title: Overview
- path: /api_docs/python/tfa/losses/contrastive
- - title: focal_loss
- section:
- - title: Overview
- path: /api_docs/python/tfa/losses/focal_loss
- - title: lifted
- section:
- - title: Overview
- path: /api_docs/python/tfa/losses/lifted
- - title: metric_learning
- section:
- - title: Overview
- path: /api_docs/python/tfa/losses/metric_learning
- - title: pairwise_distance
- path: /api_docs/python/tfa/losses/metric_learning/pairwise_distance
- - title: npairs
- section:
- - title: Overview
- path: /api_docs/python/tfa/losses/npairs
- - title: triplet
- section:
- - title: Overview
- path: /api_docs/python/tfa/losses/triplet
- - title: tfa.metrics
- section:
- - title: Overview
- path: /api_docs/python/tfa/metrics
- - title: CohenKappa
- path: /api_docs/python/tfa/metrics/CohenKappa
- - title: F1Score
- path: /api_docs/python/tfa/metrics/F1Score
- - title: FBetaScore
- path: /api_docs/python/tfa/metrics/FBetaScore
- - title: MultiLabelConfusionMatrix
- path: /api_docs/python/tfa/metrics/MultiLabelConfusionMatrix
- - title: RSquare
- path: /api_docs/python/tfa/metrics/RSquare
- - title: cohens_kappa
- section:
- - title: Overview
- path: /api_docs/python/tfa/metrics/cohens_kappa
- - title: f_scores
- section:
- - title: Overview
- path: /api_docs/python/tfa/metrics/f_scores
- - title: multilabel_confusion_matrix
- section:
- - title: Overview
- path: /api_docs/python/tfa/metrics/multilabel_confusion_matrix
- - title: r_square
- section:
- - title: Overview
- path: /api_docs/python/tfa/metrics/r_square
- - title: tfa.optimizers
- section:
- - title: Overview
- path: /api_docs/python/tfa/optimizers
- - title: AdamW
- path: /api_docs/python/tfa/optimizers/AdamW
- - title: extend_with_decoupled_weight_decay
- path: /api_docs/python/tfa/optimizers/extend_with_decoupled_weight_decay
- - title: LazyAdam
- path: /api_docs/python/tfa/optimizers/LazyAdam
- - title: MovingAverage
- path: /api_docs/python/tfa/optimizers/MovingAverage
- - title: SGDW
- path: /api_docs/python/tfa/optimizers/SGDW
- - title: lazy_adam
- section:
- - title: Overview
- path: /api_docs/python/tfa/optimizers/lazy_adam
- - title: moving_average
- section:
- - title: Overview
- path: /api_docs/python/tfa/optimizers/moving_average
- - title: weight_decay_optimizers
- section:
- - title: Overview
- path: /api_docs/python/tfa/optimizers/weight_decay_optimizers
- - title: DecoupledWeightDecayExtension
- path: /api_docs/python/tfa/optimizers/weight_decay_optimizers/DecoupledWeightDecayExtension
- - title: tfa.rnn
- section:
- - title: Overview
- path: /api_docs/python/tfa/rnn
- - title: LayerNormLSTMCell
- path: /api_docs/python/tfa/rnn/LayerNormLSTMCell
- - title: NASCell
- path: /api_docs/python/tfa/rnn/NASCell
- - title: cell
- section:
- - title: Overview
- path: /api_docs/python/tfa/rnn/cell
- - title: tfa.seq2seq
- section:
- - title: Overview
- path: /api_docs/python/tfa/seq2seq
- - title: AttentionMechanism
- path: /api_docs/python/tfa/seq2seq/AttentionMechanism
- - title: AttentionWrapper
- path: /api_docs/python/tfa/seq2seq/AttentionWrapper
- - title: AttentionWrapperState
- path: /api_docs/python/tfa/seq2seq/AttentionWrapperState
- - title: BahdanauAttention
- path: /api_docs/python/tfa/seq2seq/BahdanauAttention
- - title: BahdanauMonotonicAttention
- path: /api_docs/python/tfa/seq2seq/BahdanauMonotonicAttention
- - title: BaseDecoder
- path: /api_docs/python/tfa/seq2seq/BaseDecoder
- - title: BasicDecoder
- path: /api_docs/python/tfa/seq2seq/BasicDecoder
- - title: BasicDecoderOutput
- path: /api_docs/python/tfa/seq2seq/BasicDecoderOutput
- - title: BeamSearchDecoder
- path: /api_docs/python/tfa/seq2seq/BeamSearchDecoder
- - title: BeamSearchDecoderOutput
- path: /api_docs/python/tfa/seq2seq/BeamSearchDecoderOutput
- - title: BeamSearchDecoderState
- path: /api_docs/python/tfa/seq2seq/BeamSearchDecoderState
- - title: CustomSampler
- path: /api_docs/python/tfa/seq2seq/CustomSampler
- - title: Decoder
- path: /api_docs/python/tfa/seq2seq/Decoder
- - title: dynamic_decode
- path: /api_docs/python/tfa/seq2seq/dynamic_decode
- - title: FinalBeamSearchDecoderOutput
- path: /api_docs/python/tfa/seq2seq/FinalBeamSearchDecoderOutput
- - title: gather_tree_from_array
- path: /api_docs/python/tfa/seq2seq/gather_tree_from_array
- - title: GreedyEmbeddingSampler
- path: /api_docs/python/tfa/seq2seq/GreedyEmbeddingSampler
- - title: hardmax
- path: /api_docs/python/tfa/seq2seq/hardmax
- - title: InferenceSampler
- path: /api_docs/python/tfa/seq2seq/InferenceSampler
- - title: LuongAttention
- path: /api_docs/python/tfa/seq2seq/LuongAttention
- - title: LuongMonotonicAttention
- path: /api_docs/python/tfa/seq2seq/LuongMonotonicAttention
- - title: monotonic_attention
- path: /api_docs/python/tfa/seq2seq/monotonic_attention
- - title: safe_cumprod
- path: /api_docs/python/tfa/seq2seq/safe_cumprod
- - title: SampleEmbeddingSampler
- path: /api_docs/python/tfa/seq2seq/SampleEmbeddingSampler
- - title: Sampler
- path: /api_docs/python/tfa/seq2seq/Sampler
- - title: ScheduledEmbeddingTrainingSampler
- path: /api_docs/python/tfa/seq2seq/ScheduledEmbeddingTrainingSampler
- - title: ScheduledOutputTrainingSampler
- path: /api_docs/python/tfa/seq2seq/ScheduledOutputTrainingSampler
- - title: SequenceLoss
- path: /api_docs/python/tfa/seq2seq/SequenceLoss
- - title: sequence_loss
- path: /api_docs/python/tfa/seq2seq/sequence_loss
- - title: tile_batch
- path: /api_docs/python/tfa/seq2seq/tile_batch
- - title: TrainingSampler
- path: /api_docs/python/tfa/seq2seq/TrainingSampler
- - title: attention_wrapper
- section:
- - title: Overview
- path: /api_docs/python/tfa/seq2seq/attention_wrapper
- - title: basic_decoder
- section:
- - title: Overview
- path: /api_docs/python/tfa/seq2seq/basic_decoder
- - title: beam_search_decoder
- section:
- - title: Overview
- path: /api_docs/python/tfa/seq2seq/beam_search_decoder
- - title: attention_probs_from_attn_state
- path: /api_docs/python/tfa/seq2seq/beam_search_decoder/attention_probs_from_attn_state
- - title: BeamSearchDecoderMixin
- path: /api_docs/python/tfa/seq2seq/beam_search_decoder/BeamSearchDecoderMixin
- - title: get_attention_probs
- path: /api_docs/python/tfa/seq2seq/beam_search_decoder/get_attention_probs
- - title: decoder
- section:
- - title: Overview
- path: /api_docs/python/tfa/seq2seq/decoder
- - title: loss
- section:
- - title: Overview
- path: /api_docs/python/tfa/seq2seq/loss
- - title: sampler
- section:
- - title: Overview
- path: /api_docs/python/tfa/seq2seq/sampler
- - title: bernoulli_sample
- path: /api_docs/python/tfa/seq2seq/sampler/bernoulli_sample
- - title: categorical_sample
- path: /api_docs/python/tfa/seq2seq/sampler/categorical_sample
- - title: tfa.text
- section:
- - title: Overview
- path: /api_docs/python/tfa/text
- - title: crf_binary_score
- path: /api_docs/python/tfa/text/crf_binary_score
- - title: crf_decode
- path: /api_docs/python/tfa/text/crf_decode
- - title: crf_decode_backward
- path: /api_docs/python/tfa/text/crf_decode_backward
- - title: crf_decode_forward
- path: /api_docs/python/tfa/text/crf_decode_forward
- - title: crf_forward
- path: /api_docs/python/tfa/text/crf_forward
- - title: crf_log_likelihood
- path: /api_docs/python/tfa/text/crf_log_likelihood
- - title: crf_log_norm
- path: /api_docs/python/tfa/text/crf_log_norm
- - title: crf_multitag_sequence_score
- path: /api_docs/python/tfa/text/crf_multitag_sequence_score
- - title: crf_sequence_score
- path: /api_docs/python/tfa/text/crf_sequence_score
- - title: crf_unary_score
- path: /api_docs/python/tfa/text/crf_unary_score
- - title: skip_gram_sample
- path: /api_docs/python/tfa/text/skip_gram_sample
- - title: skip_gram_sample_with_text_vocab
- path: /api_docs/python/tfa/text/skip_gram_sample_with_text_vocab
- - title: viterbi_decode
- path: /api_docs/python/tfa/text/viterbi_decode
- - title: crf
- section:
- - title: Overview
- path: /api_docs/python/tfa/text/crf
- - title: CrfDecodeForwardRnnCell
- path: /api_docs/python/tfa/text/crf/CrfDecodeForwardRnnCell
- - title: skip_gram_ops
- section:
- - title: Overview
- path: /api_docs/python/tfa/text/skip_gram_ops
+- title: tfa
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa
+- title: tfa.activations
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/activations
+ - title: gelu
+ path: /api_docs/python/tfa/activations/gelu
+ - title: sparsemax
+ path: /api_docs/python/tfa/activations/sparsemax
+- title: tfa.callbacks
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/callbacks
+- title: tfa.image
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/image
+ - title: adjust_hsv_in_yiq
+ path: /api_docs/python/tfa/image/adjust_hsv_in_yiq
+ - title: connected_components
+ path: /api_docs/python/tfa/image/connected_components
+ - title: dense_image_warp
+ path: /api_docs/python/tfa/image/dense_image_warp
+ - title: euclidean_dist_transform
+ path: /api_docs/python/tfa/image/euclidean_dist_transform
+ - title: interpolate_bilinear
+ path: /api_docs/python/tfa/image/interpolate_bilinear
+ - title: interpolate_spline
+ path: /api_docs/python/tfa/image/interpolate_spline
+ - title: mean_filter2d
+ path: /api_docs/python/tfa/image/mean_filter2d
+ - title: median_filter2d
+ path: /api_docs/python/tfa/image/median_filter2d
+ - title: random_hsv_in_yiq
+ path: /api_docs/python/tfa/image/random_hsv_in_yiq
+ - title: rotate
+ path: /api_docs/python/tfa/image/rotate
+ - title: sparse_image_warp
+ path: /api_docs/python/tfa/image/sparse_image_warp
+ - title: transform
+ path: /api_docs/python/tfa/image/transform
+ - title: translate
+ path: /api_docs/python/tfa/image/translate
+ - title: distance_transform
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/image/distance_transform
+ - title: distort_image_ops
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/image/distort_image_ops
+ - title: filters
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/image/filters
+ - title: transform_ops
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/image/transform_ops
+ - title: angles_to_projective_transforms
+ path: /api_docs/python/tfa/image/transform_ops/angles_to_projective_transforms
+ - title: compose_transforms
+ path: /api_docs/python/tfa/image/transform_ops/compose_transforms
+ - title: flat_transforms_to_matrices
+ path: /api_docs/python/tfa/image/transform_ops/flat_transforms_to_matrices
+ - title: matrices_to_flat_transforms
+ path: /api_docs/python/tfa/image/transform_ops/matrices_to_flat_transforms
+ - title: translate_ops
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/image/translate_ops
+ - title: translations_to_projective_transforms
+ path: /api_docs/python/tfa/image/translate_ops/translations_to_projective_transforms
+ - title: utils
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/image/utils
+ - title: from_4D_image
+ path: /api_docs/python/tfa/image/utils/from_4D_image
+ - title: get_ndims
+ path: /api_docs/python/tfa/image/utils/get_ndims
+ - title: to_4D_image
+ path: /api_docs/python/tfa/image/utils/to_4D_image
+- title: tfa.layers
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/layers
+ - title: CorrelationCost
+ path: /api_docs/python/tfa/layers/CorrelationCost
+ - title: GeLU
+ path: /api_docs/python/tfa/layers/GeLU
+ - title: GroupNormalization
+ path: /api_docs/python/tfa/layers/GroupNormalization
+ - title: InstanceNormalization
+ path: /api_docs/python/tfa/layers/InstanceNormalization
+ - title: Maxout
+ path: /api_docs/python/tfa/layers/Maxout
+ - title: PoincareNormalize
+ path: /api_docs/python/tfa/layers/PoincareNormalize
+ - title: Sparsemax
+ path: /api_docs/python/tfa/layers/Sparsemax
+ - title: WeightNormalization
+ path: /api_docs/python/tfa/layers/WeightNormalization
+ - title: gelu
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/layers/gelu
+ - title: maxout
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/layers/maxout
+ - title: normalizations
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/layers/normalizations
+ - title: optical_flow
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/layers/optical_flow
+ - title: poincare
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/layers/poincare
+ - title: sparsemax
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/layers/sparsemax
+ - title: wrappers
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/layers/wrappers
+- title: tfa.losses
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/losses
+ - title: ContrastiveLoss
+ path: /api_docs/python/tfa/losses/ContrastiveLoss
+ - title: contrastive_loss
+ path: /api_docs/python/tfa/losses/contrastive_loss
+ - title: LiftedStructLoss
+ path: /api_docs/python/tfa/losses/LiftedStructLoss
+ - title: lifted_struct_loss
+ path: /api_docs/python/tfa/losses/lifted_struct_loss
+ - title: NpairsLoss
+ path: /api_docs/python/tfa/losses/NpairsLoss
+ - title: npairs_loss
+ path: /api_docs/python/tfa/losses/npairs_loss
+ - title: SigmoidFocalCrossEntropy
+ path: /api_docs/python/tfa/losses/SigmoidFocalCrossEntropy
+ - title: sigmoid_focal_crossentropy
+ path: /api_docs/python/tfa/losses/sigmoid_focal_crossentropy
+ - title: SparsemaxLoss
+ path: /api_docs/python/tfa/losses/SparsemaxLoss
+ - title: sparsemax_loss
+ path: /api_docs/python/tfa/losses/sparsemax_loss
+ - title: TripletSemiHardLoss
+ path: /api_docs/python/tfa/losses/TripletSemiHardLoss
+ - title: triplet_semihard_loss
+ path: /api_docs/python/tfa/losses/triplet_semihard_loss
+ - title: contrastive
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/losses/contrastive
+ - title: focal_loss
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/losses/focal_loss
+ - title: lifted
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/losses/lifted
+ - title: metric_learning
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/losses/metric_learning
+ - title: pairwise_distance
+ path: /api_docs/python/tfa/losses/metric_learning/pairwise_distance
+ - title: npairs
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/losses/npairs
+ - title: triplet
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/losses/triplet
+- title: tfa.metrics
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/metrics
+ - title: CohenKappa
+ path: /api_docs/python/tfa/metrics/CohenKappa
+ - title: F1Score
+ path: /api_docs/python/tfa/metrics/F1Score
+ - title: FBetaScore
+ path: /api_docs/python/tfa/metrics/FBetaScore
+ - title: MultiLabelConfusionMatrix
+ path: /api_docs/python/tfa/metrics/MultiLabelConfusionMatrix
+ - title: RSquare
+ path: /api_docs/python/tfa/metrics/RSquare
+ - title: cohens_kappa
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/metrics/cohens_kappa
+ - title: f_scores
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/metrics/f_scores
+ - title: multilabel_confusion_matrix
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/metrics/multilabel_confusion_matrix
+ - title: r_square
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/metrics/r_square
+- title: tfa.optimizers
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/optimizers
+ - title: AdamW
+ path: /api_docs/python/tfa/optimizers/AdamW
+ - title: extend_with_decoupled_weight_decay
+ path: /api_docs/python/tfa/optimizers/extend_with_decoupled_weight_decay
+ - title: LazyAdam
+ path: /api_docs/python/tfa/optimizers/LazyAdam
+ - title: MovingAverage
+ path: /api_docs/python/tfa/optimizers/MovingAverage
+ - title: SGDW
+ path: /api_docs/python/tfa/optimizers/SGDW
+ - title: lazy_adam
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/optimizers/lazy_adam
+ - title: moving_average
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/optimizers/moving_average
+ - title: weight_decay_optimizers
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/optimizers/weight_decay_optimizers
+ - title: DecoupledWeightDecayExtension
+ path: /api_docs/python/tfa/optimizers/weight_decay_optimizers/DecoupledWeightDecayExtension
+- title: tfa.rnn
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/rnn
+ - title: LayerNormLSTMCell
+ path: /api_docs/python/tfa/rnn/LayerNormLSTMCell
+ - title: NASCell
+ path: /api_docs/python/tfa/rnn/NASCell
+ - title: cell
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/rnn/cell
+- title: tfa.seq2seq
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/seq2seq
+ - title: AttentionMechanism
+ path: /api_docs/python/tfa/seq2seq/AttentionMechanism
+ - title: AttentionWrapper
+ path: /api_docs/python/tfa/seq2seq/AttentionWrapper
+ - title: AttentionWrapperState
+ path: /api_docs/python/tfa/seq2seq/AttentionWrapperState
+ - title: BahdanauAttention
+ path: /api_docs/python/tfa/seq2seq/BahdanauAttention
+ - title: BahdanauMonotonicAttention
+ path: /api_docs/python/tfa/seq2seq/BahdanauMonotonicAttention
+ - title: BaseDecoder
+ path: /api_docs/python/tfa/seq2seq/BaseDecoder
+ - title: BasicDecoder
+ path: /api_docs/python/tfa/seq2seq/BasicDecoder
+ - title: BasicDecoderOutput
+ path: /api_docs/python/tfa/seq2seq/BasicDecoderOutput
+ - title: BeamSearchDecoder
+ path: /api_docs/python/tfa/seq2seq/BeamSearchDecoder
+ - title: BeamSearchDecoderOutput
+ path: /api_docs/python/tfa/seq2seq/BeamSearchDecoderOutput
+ - title: BeamSearchDecoderState
+ path: /api_docs/python/tfa/seq2seq/BeamSearchDecoderState
+ - title: CustomSampler
+ path: /api_docs/python/tfa/seq2seq/CustomSampler
+ - title: Decoder
+ path: /api_docs/python/tfa/seq2seq/Decoder
+ - title: dynamic_decode
+ path: /api_docs/python/tfa/seq2seq/dynamic_decode
+ - title: FinalBeamSearchDecoderOutput
+ path: /api_docs/python/tfa/seq2seq/FinalBeamSearchDecoderOutput
+ - title: gather_tree_from_array
+ path: /api_docs/python/tfa/seq2seq/gather_tree_from_array
+ - title: GreedyEmbeddingSampler
+ path: /api_docs/python/tfa/seq2seq/GreedyEmbeddingSampler
+ - title: hardmax
+ path: /api_docs/python/tfa/seq2seq/hardmax
+ - title: InferenceSampler
+ path: /api_docs/python/tfa/seq2seq/InferenceSampler
+ - title: LuongAttention
+ path: /api_docs/python/tfa/seq2seq/LuongAttention
+ - title: LuongMonotonicAttention
+ path: /api_docs/python/tfa/seq2seq/LuongMonotonicAttention
+ - title: monotonic_attention
+ path: /api_docs/python/tfa/seq2seq/monotonic_attention
+ - title: safe_cumprod
+ path: /api_docs/python/tfa/seq2seq/safe_cumprod
+ - title: SampleEmbeddingSampler
+ path: /api_docs/python/tfa/seq2seq/SampleEmbeddingSampler
+ - title: Sampler
+ path: /api_docs/python/tfa/seq2seq/Sampler
+ - title: ScheduledEmbeddingTrainingSampler
+ path: /api_docs/python/tfa/seq2seq/ScheduledEmbeddingTrainingSampler
+ - title: ScheduledOutputTrainingSampler
+ path: /api_docs/python/tfa/seq2seq/ScheduledOutputTrainingSampler
+ - title: SequenceLoss
+ path: /api_docs/python/tfa/seq2seq/SequenceLoss
+ - title: sequence_loss
+ path: /api_docs/python/tfa/seq2seq/sequence_loss
+ - title: tile_batch
+ path: /api_docs/python/tfa/seq2seq/tile_batch
+ - title: TrainingSampler
+ path: /api_docs/python/tfa/seq2seq/TrainingSampler
+ - title: attention_wrapper
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/seq2seq/attention_wrapper
+ - title: basic_decoder
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/seq2seq/basic_decoder
+ - title: beam_search_decoder
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/seq2seq/beam_search_decoder
+ - title: attention_probs_from_attn_state
+ path: /api_docs/python/tfa/seq2seq/beam_search_decoder/attention_probs_from_attn_state
+ - title: BeamSearchDecoderMixin
+ path: /api_docs/python/tfa/seq2seq/beam_search_decoder/BeamSearchDecoderMixin
+ - title: get_attention_probs
+ path: /api_docs/python/tfa/seq2seq/beam_search_decoder/get_attention_probs
+ - title: decoder
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/seq2seq/decoder
+ - title: loss
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/seq2seq/loss
+ - title: sampler
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/seq2seq/sampler
+ - title: bernoulli_sample
+ path: /api_docs/python/tfa/seq2seq/sampler/bernoulli_sample
+ - title: categorical_sample
+ path: /api_docs/python/tfa/seq2seq/sampler/categorical_sample
+- title: tfa.text
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/text
+ - title: crf_binary_score
+ path: /api_docs/python/tfa/text/crf_binary_score
+ - title: crf_decode
+ path: /api_docs/python/tfa/text/crf_decode
+ - title: crf_decode_backward
+ path: /api_docs/python/tfa/text/crf_decode_backward
+ - title: crf_decode_forward
+ path: /api_docs/python/tfa/text/crf_decode_forward
+ - title: crf_forward
+ path: /api_docs/python/tfa/text/crf_forward
+ - title: crf_log_likelihood
+ path: /api_docs/python/tfa/text/crf_log_likelihood
+ - title: crf_log_norm
+ path: /api_docs/python/tfa/text/crf_log_norm
+ - title: crf_multitag_sequence_score
+ path: /api_docs/python/tfa/text/crf_multitag_sequence_score
+ - title: crf_sequence_score
+ path: /api_docs/python/tfa/text/crf_sequence_score
+ - title: crf_unary_score
+ path: /api_docs/python/tfa/text/crf_unary_score
+ - title: skip_gram_sample
+ path: /api_docs/python/tfa/text/skip_gram_sample
+ - title: skip_gram_sample_with_text_vocab
+ path: /api_docs/python/tfa/text/skip_gram_sample_with_text_vocab
+ - title: viterbi_decode
+ path: /api_docs/python/tfa/text/viterbi_decode
+ - title: crf
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/text/crf
+ - title: CrfDecodeForwardRnnCell
+ path: /api_docs/python/tfa/text/crf/CrfDecodeForwardRnnCell
+ - title: skip_gram_ops
+ section:
+ - title: Overview
+ path: /api_docs/python/tfa/text/skip_gram_ops
diff --git a/docs/api_docs/python/index.md b/docs/api_docs/python/index.md
index 2a35bd4aad..ae466a15ff 100644
--- a/docs/api_docs/python/index.md
+++ b/docs/api_docs/python/index.md
@@ -62,7 +62,6 @@
* tfa.layers.normalizations.InstanceNormalization
* tfa.layers.optical_flow
* tfa.layers.optical_flow.CorrelationCost
-* tfa.layers.optical_flow.correlation_cost
* tfa.layers.poincare
* tfa.layers.poincare.PoincareNormalize
* tfa.layers.sparsemax
diff --git a/docs/api_docs/python/tfa/_api_cache.json b/docs/api_docs/python/tfa/_api_cache.json
index 77850f5dfc..0c7d720fab 100644
--- a/docs/api_docs/python/tfa/_api_cache.json
+++ b/docs/api_docs/python/tfa/_api_cache.json
@@ -2253,7 +2253,6 @@
"tfa.layers.optical_flow.CorrelationCost.weights": true,
"tfa.layers.optical_flow.CorrelationCost.with_name_scope": true,
"tfa.layers.optical_flow.absolute_import": true,
- "tfa.layers.optical_flow.correlation_cost": false,
"tfa.layers.optical_flow.division": true,
"tfa.layers.optical_flow.print_function": true,
"tfa.layers.poincare": false,
diff --git a/docs/api_docs/python/tfa/layers.md b/docs/api_docs/python/tfa/layers.md
index ecab726d58..5a780b5c18 100644
--- a/docs/api_docs/python/tfa/layers.md
+++ b/docs/api_docs/python/tfa/layers.md
@@ -40,7 +40,7 @@ Additional layers that conform to Keras API.
## Classes
-[`class CorrelationCost`](../tfa/layers/CorrelationCost.md)
+[`class CorrelationCost`](../tfa/layers/CorrelationCost.md): Correlation Cost Layer.
[`class GeLU`](../tfa/layers/GeLU.md): Gaussian Error Linear Unit.
diff --git a/docs/api_docs/python/tfa/layers/CorrelationCost.md b/docs/api_docs/python/tfa/layers/CorrelationCost.md
index 0812320e87..982142081e 100644
--- a/docs/api_docs/python/tfa/layers/CorrelationCost.md
+++ b/docs/api_docs/python/tfa/layers/CorrelationCost.md
@@ -51,7 +51,7 @@
-
+
View source on GitHub
@@ -61,7 +61,7 @@
## Class `CorrelationCost`
-
+Correlation Cost Layer.
@@ -72,10 +72,29 @@
+This layer implements the correlation operation from FlowNet Learning
+Optical Flow with Convolutional Networks (Fischer et al.):
+https://arxiv.org/abs/1504.06
+
+#### Args:
+
+
+* `kernel_size`: An integer specifying the height and width of the
+ patch used to compute the per-patch costs.
+* `max_displacement`: An integer specifying the maximum search radius
+ for each position.
+* `stride_1`: An integer specifying the stride length in the input.
+* `stride_2`: An integer specifying the stride length in the patch.
+* `pad`: An integer specifying the paddings in height and width.
+* `data_format`: Specifies the data format.
+ Possible values are:
+ "channels_last" float [batch, height, width, channels]
+ "channels_first" float [batch, channels, height, width]
+ Defaults to `"channels_last"`.
__init__
-View source
+View source
``` python
__init__(
@@ -390,7 +409,7 @@ Output tensor(s).
build
-View source
+View source
``` python
build(input_shape)
@@ -426,7 +445,7 @@ None or a tensor (or list of tensors,
compute_output_shape
-View source
+View source
``` python
compute_output_shape(input_shape)
@@ -486,7 +505,7 @@ A layer instance.
get_config
-View source
+View source
``` python
get_config()
diff --git a/docs/api_docs/python/tfa/layers/optical_flow.md b/docs/api_docs/python/tfa/layers/optical_flow.md
index 2ea1538ea3..b7b44741a0 100644
--- a/docs/api_docs/python/tfa/layers/optical_flow.md
+++ b/docs/api_docs/python/tfa/layers/optical_flow.md
@@ -24,9 +24,5 @@ Tensorflow op performing correlation cost operation.
## Classes
-[`class CorrelationCost`](../../tfa/layers/CorrelationCost.md)
-
-## Functions
-
-[`correlation_cost(...)`](../../tfa/layers/optical_flow/correlation_cost.md): Correlation Cost Volume computation.
+[`class CorrelationCost`](../../tfa/layers/CorrelationCost.md): Correlation Cost Layer.
diff --git a/docs/api_docs/python/tfa/layers/optical_flow/correlation_cost.md b/docs/api_docs/python/tfa/layers/optical_flow/correlation_cost.md
deleted file mode 100644
index 2ce49dbd53..0000000000
--- a/docs/api_docs/python/tfa/layers/optical_flow/correlation_cost.md
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
-# tfa.layers.optical_flow.correlation_cost
-
-
-
-
-
-
-Correlation Cost Volume computation.
-
-``` python
-tfa.layers.optical_flow.correlation_cost(
- input_a,
- input_b,
- kernel_size,
- max_displacement,
- stride_1,
- stride_2,
- pad,
- data_format='channels_last',
- name=None
-)
-```
-
-
-
-
-
-"FlowNet: Learning Optical Flow with Convolutional Networks"
-Philipp Fischer, Alexey Dosovitskiy, Eddy Ilg, Philip Hausser,
-Caner Hazirbas, Vladimir Golkov, Patrick van der Smagt,
-Daniel Cremers, Thomas Brox. https://arxiv.org/abs/1504.06852
-
-Computes a cost volume using correlation for two inputs. For feature
-maps A, B with spatial dimensions w, h, c it computes
-
- output(a, b) = sum_{l in [-k,k]**2} < I(a+l), J(b+l) >
-
-where the patches of size K=2d + 1 are centered in position a resp. b.
-
-The output shape is [B, C', H', W'], where
-
- r = max_displacement / stride_2;
- bd = max_displacement + (kernel_size - 1) / 2
- C' = (2 * r + 1) ** 2
- H' = H + 2 * (pad - bd) / stride_1
- W' = W + 2 * (pad - bd) / stride_1
-
-Note: When the data_format requests "channels_last", an additional explicit
- transpose operation is executed.
-
-#### Args:
-
-
-* `input_a`: A `Tensor` of the format specified by `data_format`.
-* `input_b`: A `Tensor` of the format specified by `data_format`.
-* `kernel_size`: An integer specifying the height and width of the
- patch used to compute the per-patch costs.
-* `max_displacement`: An integer specifying the maximum search radius
- for each position.
-* `stride_1`: An integer specifying the stride length in the input.
-* `stride_2`: An integer specifying the stride length in the patch.
-* `pad`: An integer specifying the paddings in height and width.
-* `data_format`: Specifies the data format.
- Possible values are:
- "channels_last" float [batch, height, width, channels]
- "channels_first" float [batch, channels, height, width]
- Defaults to `"channels_last"`.
-* `name`: A name for the operation (optional).
-
-
-#### Returns:
-
-A `Tensor` of the format specified by `data_format`.
diff --git a/setup.py b/setup.py
index 5d6d3cba40..ee55966130 100644
--- a/setup.py
+++ b/setup.py
@@ -69,9 +69,9 @@
if project_name == TFA_RELEASE:
# TODO: remove if-else condition when tf supports package consolidation.
if platform.system() == 'Linux':
- REQUIRED_PACKAGES.append('tensorflow-gpu == 2.0.0-rc0')
+ REQUIRED_PACKAGES.append('tensorflow-gpu == 2.0.0-rc1')
else:
- REQUIRED_PACKAGES.append('tensorflow == 2.0.0-rc0')
+ REQUIRED_PACKAGES.append('tensorflow == 2.0.0-rc1')
elif project_name == TFA_NIGHTLY:
# TODO: remove if-else condition when tf-nightly supports package consolidation.
if platform.system() == 'Linux':
diff --git a/tensorflow_addons/layers/optical_flow.py b/tensorflow_addons/layers/optical_flow.py
index c2c843548a..b3c58d28aa 100644
--- a/tensorflow_addons/layers/optical_flow.py
+++ b/tensorflow_addons/layers/optical_flow.py
@@ -27,15 +27,15 @@
@tf.function
-def correlation_cost(input_a,
- input_b,
- kernel_size,
- max_displacement,
- stride_1,
- stride_2,
- pad,
- data_format='channels_last',
- name=None):
+def _correlation_cost(input_a,
+ input_b,
+ kernel_size,
+ max_displacement,
+ stride_1,
+ stride_2,
+ pad,
+ data_format='channels_last',
+ name=None):
"""Correlation Cost Volume computation.
"FlowNet: Learning Optical Flow with Convolutional Networks"
@@ -141,6 +141,27 @@ def _correlation_cost_grad(op, grad_output):
@keras_utils.register_keras_custom_object
class CorrelationCost(tf.keras.layers.Layer):
+ """Correlation Cost Layer.
+
+ This layer implements the correlation operation from FlowNet Learning
+ Optical Flow with Convolutional Networks (Fischer et al.):
+ https://arxiv.org/abs/1504.06
+
+ Args:
+ kernel_size: An integer specifying the height and width of the
+ patch used to compute the per-patch costs.
+ max_displacement: An integer specifying the maximum search radius
+ for each position.
+ stride_1: An integer specifying the stride length in the input.
+ stride_2: An integer specifying the stride length in the patch.
+ pad: An integer specifying the paddings in height and width.
+ data_format: Specifies the data format.
+ Possible values are:
+ "channels_last" float [batch, height, width, channels]
+ "channels_first" float [batch, channels, height, width]
+ Defaults to `"channels_last"`.
+ """
+
def __init__(self, kernel_size, max_displacement, stride_1, stride_2, pad,
data_format, **kwargs):
self.kernel_size = kernel_size
@@ -169,7 +190,7 @@ def call(self, inputs):
input_a = tf.convert_to_tensor(inputs[0])
input_b = tf.convert_to_tensor(inputs[1])
- return correlation_cost(
+ return _correlation_cost(
input_a,
input_b,
kernel_size=self.kernel_size,
diff --git a/tensorflow_addons/layers/optical_flow_test.py b/tensorflow_addons/layers/optical_flow_test.py
index 060f572c5f..13e4845f7a 100644
--- a/tensorflow_addons/layers/optical_flow_test.py
+++ b/tensorflow_addons/layers/optical_flow_test.py
@@ -19,7 +19,7 @@
import numpy as np
import tensorflow as tf
-from tensorflow_addons.layers.optical_flow import correlation_cost, CorrelationCost
+from tensorflow_addons.layers.optical_flow import CorrelationCost
from tensorflow_addons.utils import test_utils
@@ -31,15 +31,13 @@ def _forward(self, input_a, input_b, kernel_size, max_displacement,
input_a_op = tf.convert_to_tensor(input_a, dtype=tf.float32)
input_b_op = tf.convert_to_tensor(input_b, dtype=tf.float32)
- output = correlation_cost(
- input_a_op,
- input_b_op,
+ output = CorrelationCost(
kernel_size=kernel_size,
max_displacement=max_displacement,
stride_1=stride_1,
stride_2=stride_2,
pad=pad,
- data_format=data_format)
+ data_format=data_format)([input_a_op, input_b_op])
return output
@@ -117,15 +115,13 @@ def _gradients(self, data_format):
input_b_op = tf.convert_to_tensor(input_b)
def correlation_fn(input_a, input_b):
- return correlation_cost(
- input_a,
- input_b,
+ return CorrelationCost(
kernel_size=kernel_size,
max_displacement=max_displacement,
stride_1=stride_1,
stride_2=stride_2,
pad=pad,
- data_format=data_format)
+ data_format=data_format)([input_a, input_b])
theoretical, numerical = tf.test.compute_gradient(
correlation_fn, [input_a_op, input_b_op])
@@ -159,7 +155,7 @@ def _keras(self, data_format):
x = [input_a, input_b]
y = layer(x)
- model = tf.python.keras.models.Model(x, y)
+ model = tf.keras.models.Model(x, y)
actual_output = model.predict([val_a, val_b])
expected_output_type = 'float32'
diff --git a/tensorflow_addons/seq2seq/beam_search_decoder.py b/tensorflow_addons/seq2seq/beam_search_decoder.py
index 2ed00b514f..e2e67e8c21 100644
--- a/tensorflow_addons/seq2seq/beam_search_decoder.py
+++ b/tensorflow_addons/seq2seq/beam_search_decoder.py
@@ -764,7 +764,7 @@ def output_dtype(self):
parent_ids=tf.int32)
def call(self,
- embeddning,
+ embedding,
start_tokens,
end_token,
initial_state,
@@ -782,7 +782,7 @@ def call(self,
parallel_iterations=self.parallel_iterations,
swap_memory=self.swap_memory,
training=training,
- decoder_init_input=embeddning,
+ decoder_init_input=embedding,
decoder_init_kwargs=init_kwargs)
|