From d065a5d984794a0e59bc1787010ef4b911d4ef89 Mon Sep 17 00:00:00 2001 From: Andrew Selle Date: Mon, 13 Feb 2017 15:34:18 -0800 Subject: [PATCH] Link docstrings to module guides and remove redundant text. Change: 147402322 --- tensorflow/contrib/training/__init__.py | 38 +------------------------ tensorflow/contrib/util/__init__.py | 4 +-- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/tensorflow/contrib/training/__init__.py b/tensorflow/contrib/training/__init__.py index ed975b29132..245f36c2fe2 100644 --- a/tensorflow/contrib/training/__init__.py +++ b/tensorflow/contrib/training/__init__.py @@ -12,51 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== -"""Training and input utilities. - -## Splitting sequence inputs into minibatches with state saving - -Use [`SequenceQueueingStateSaver`](#SequenceQueueingStateSaver) or -its wrapper [`batch_sequences_with_states`](#batch_sequences_with_states) if -you have input data with a dynamic primary time / frame count axis which -you'd like to convert into fixed size segments during minibatching, and would -like to store state in the forward direction across segments of an example. +"""Training and input utilities. See @{$python/contrib.training} guide. @@batch_sequences_with_states @@NextQueuedSequenceBatch @@SequenceQueueingStateSaver - - -## Online data resampling - -To resample data with replacement on a per-example basis, use -['rejection_sample'](#rejection_sample) or -['resample_at_rate'](#resample_at_rate). For `rejection_sample`, provide -a boolean Tensor describing whether to accept or reject. Resulting batch sizes -are always the same. For `resample_at_rate`, provide the desired rate for each -example. Resulting batch sizes may vary. If you wish to specify relative -rates, rather than absolute ones, use ['weighted_resample'](#weighted_resample) -(which also returns the actual resampling rate used for each output example). - -Use ['stratified_sample'](#stratified_sample) to resample without replacement -from the data to achieve a desired mix of class proportions that the Tensorflow -graph sees. For instance, if you have a binary classification dataset that is -99.9% class 1, a common approach is to resample from the data so that the data -is more balanced. - @@rejection_sample @@resample_at_rate @@stratified_sample @@weighted_resample - -## Bucketing - -Use ['bucket'](#bucket) or -['bucket_by_sequence_length'](#bucket_by_sequence_length) to stratify -minibatches into groups ("buckets"). Use `bucket_by_sequence_length` -with the argument `dynamic_pad=True` to receive minibatches of similarly -sized sequences for efficient training via `dynamic_rnn`. - @@bucket @@bucket_by_sequence_length """ diff --git a/tensorflow/contrib/util/__init__.py b/tensorflow/contrib/util/__init__.py index 45efdc20c80..a0b845502fa 100644 --- a/tensorflow/contrib/util/__init__.py +++ b/tensorflow/contrib/util/__init__.py @@ -13,9 +13,7 @@ # limitations under the License. # ============================================================================== -"""Utilities for dealing with Tensors. - -## Miscellaneous Utility Functions +"""Utilities for dealing with Tensors. See @{$python/contrib.util} guide. @@constant_value @@make_tensor_proto