aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/training/__init__.py
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2016-10-11 17:34:13 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-10-11 18:50:14 -0700
commit2c183364e6994ef00d3cff930cb383c4e9443f25 (patch)
tree95abd17465954d768d834f2afeea666f3f208f9f /tensorflow/contrib/training/__init__.py
parent40fc65b0f5791f40132fbd173bfde7521f14fed5 (diff)
Check in code to perform rejection sampling.
Change: 135869416
Diffstat (limited to 'tensorflow/contrib/training/__init__.py')
-rw-r--r--tensorflow/contrib/training/__init__.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tensorflow/contrib/training/__init__.py b/tensorflow/contrib/training/__init__.py
index fc0e324bcf..1290854260 100644
--- a/tensorflow/contrib/training/__init__.py
+++ b/tensorflow/contrib/training/__init__.py
@@ -30,10 +30,12 @@ like to store state in the forward direction across segments of an example.
## Online data resampling
To resample data with replacement on a per-example basis, use
-['resample_at_rate'](#resample_at_rate), providing the desired rate
-for each example. 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).
+['rejection_sample'](#rejection_sample) or
+['resample_at_rate'](#resample_at_rate). For `rejection_sample`, provide
+a boolean Tensor describing whether to accept or reject. For `resample_at_rate`,
+providing the desired rate for each example. 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) or
['stratified_sample_unknown_dist'](#stratified_sample_unknown_dist) to
@@ -43,6 +45,7 @@ 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
@@stratified_sample_unknown_dist