tf.contrib.training.weighted_resample
Stay organized with collections
Save and categorize content based on your preferences.
Performs an approximate weighted resampling of inputs
.
tf.contrib.training.weighted_resample(
inputs, weights, overall_rate, scope=None, mean_decay=0.999, seed=None
)
This method chooses elements from inputs
where each item's rate of
selection is proportional to its value in weights
, and the average
rate of selection across all inputs (and many invocations!) is
overall_rate
.
Args |
inputs
|
A list of tensors whose first dimension is batch_size .
|
weights
|
A [batch_size] -shaped tensor with each batch member's weight.
|
overall_rate
|
Desired overall rate of resampling.
|
scope
|
Scope to use for the op.
|
mean_decay
|
How quickly to decay the running estimate of the mean weight.
|
seed
|
Random seed.
|
Returns |
A list of tensors exactly like inputs , but with an unknown (and
possibly zero) first dimension.
A tensor containing the effective resampling rate used for each output.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.training.weighted_resample\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/training/python/training/resample.py#L101-L148) |\n\nPerforms an approximate weighted resampling of `inputs`. \n\n tf.contrib.training.weighted_resample(\n inputs, weights, overall_rate, scope=None, mean_decay=0.999, seed=None\n )\n\nThis method chooses elements from `inputs` where each item's rate of\nselection is proportional to its value in `weights`, and the average\nrate of selection across all inputs (and many invocations!) is\n`overall_rate`.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------------|-----------------------------------------------------------------|\n| `inputs` | A list of tensors whose first dimension is `batch_size`. |\n| `weights` | A `[batch_size]`-shaped tensor with each batch member's weight. |\n| `overall_rate` | Desired overall rate of resampling. |\n| `scope` | Scope to use for the op. |\n| `mean_decay` | How quickly to decay the running estimate of the mean weight. |\n| `seed` | Random seed. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A list of tensors exactly like `inputs`, but with an unknown (and possibly zero) first dimension. A tensor containing the effective resampling rate used for each output. ||\n\n\u003cbr /\u003e"]]