Update generated Python Op docs.

Change: 146176865
This commit is contained in:
A. Unique TensorFlower 2017-01-31 15:49:58 -08:00 committed by TensorFlower Gardener
parent 30771c9087
commit fd7d78ddf1
5 changed files with 130 additions and 0 deletions

View File

@ -35,6 +35,13 @@ be `dtypes.float32` or `dtypes.float64`. If neither `tensors` nor
float.
- - -
### `tf.contrib.framework.assert_scalar(tensor, name=None)` {#assert_scalar}
- - -
### `tf.contrib.framework.assert_scalar_int(tensor, name=None)` {#assert_scalar_int}
@ -225,6 +232,27 @@ adds them via `tf.add_n`.
* <b>`ValueError`</b>: if `losses` is missing or empty.
- - -
### `tf.contrib.framework.remove_squeezable_dimensions(predictions, labels, name=None)` {#remove_squeezable_dimensions}
Squeeze last dim if ranks of `predictions` and `labels` differ by 1.
This will use static shape if available. Otherwise, it will add graph
operations, which could result in a performance hit.
##### Args:
* <b>`predictions`</b>: Predicted values, a `Tensor` of arbitrary dimensions.
* <b>`labels`</b>: Label values, a `Tensor` whose dimensions match `predictions`.
* <b>`name`</b>: Name of the op.
##### Returns:
Tuple of `predictions` and `labels`, possibly with last dim squeezed.
- - -
### `tf.contrib.framework.with_shape(expected_shape, tensor)` {#with_shape}
@ -650,6 +678,46 @@ Create global step tensor in graph.
* <b>`ValueError`</b>: if global step key is already defined.
- - -
### `tf.contrib.framework.filter_variables(var_list, include_patterns=None, exclude_patterns=None, reg_search=True)` {#filter_variables}
Filter a list of variables using regular expressions.
First includes variables according to the list of include_patterns.
Afterwards, eliminates variables according to the list of exclude_patterns.
For example, one can obtain a list of variables with the weights of all
convolutional layers (depending on the network definition) by:
```python
variables = tf.contrib.framework.get_model_variables()
conv_weight_variables = tf.contrib.framework.filter_variables(
variables,
include_patterns=['Conv'],
exclude_patterns=['biases', 'Logits'])
```
##### Args:
* <b>`var_list`</b>: list of variables.
* <b>`include_patterns`</b>: list of regular expressions to include. Defaults to None,
which means all variables are selected according to the include rules.
A variable is included if it matches any of the include_patterns.
* <b>`exclude_patterns`</b>: list of regular expressions to exclude. Defaults to None,
which means all variables are selected according to the exclude rules.
A variable is excluded if it matches any of the exclude_patterns.
* <b>`reg_search`</b>: boolean. If True (default), performs re.search to find matches
(i.e. pattern can match any substring of the variable name). If False,
performs re.match (i.e. regexp should match from the beginning of the
variable name).
##### Returns:
filtered list of variables.
- - -
### `tf.train.get_global_step(graph=None)` {#get_global_step}

View File

@ -0,0 +1,4 @@
### `tf.contrib.framework.assert_scalar(tensor, name=None)` {#assert_scalar}

View File

@ -0,0 +1,37 @@
### `tf.contrib.framework.filter_variables(var_list, include_patterns=None, exclude_patterns=None, reg_search=True)` {#filter_variables}
Filter a list of variables using regular expressions.
First includes variables according to the list of include_patterns.
Afterwards, eliminates variables according to the list of exclude_patterns.
For example, one can obtain a list of variables with the weights of all
convolutional layers (depending on the network definition) by:
```python
variables = tf.contrib.framework.get_model_variables()
conv_weight_variables = tf.contrib.framework.filter_variables(
variables,
include_patterns=['Conv'],
exclude_patterns=['biases', 'Logits'])
```
##### Args:
* <b>`var_list`</b>: list of variables.
* <b>`include_patterns`</b>: list of regular expressions to include. Defaults to None,
which means all variables are selected according to the include rules.
A variable is included if it matches any of the include_patterns.
* <b>`exclude_patterns`</b>: list of regular expressions to exclude. Defaults to None,
which means all variables are selected according to the exclude rules.
A variable is excluded if it matches any of the exclude_patterns.
* <b>`reg_search`</b>: boolean. If True (default), performs re.search to find matches
(i.e. pattern can match any substring of the variable name). If False,
performs re.match (i.e. regexp should match from the beginning of the
variable name).
##### Returns:
filtered list of variables.

View File

@ -0,0 +1,18 @@
### `tf.contrib.framework.remove_squeezable_dimensions(predictions, labels, name=None)` {#remove_squeezable_dimensions}
Squeeze last dim if ranks of `predictions` and `labels` differ by 1.
This will use static shape if available. Otherwise, it will add graph
operations, which could result in a performance hit.
##### Args:
* <b>`predictions`</b>: Predicted values, a `Tensor` of arbitrary dimensions.
* <b>`labels`</b>: Label values, a `Tensor` whose dimensions match `predictions`.
* <b>`name`</b>: Name of the op.
##### Returns:
Tuple of `predictions` and `labels`, possibly with last dim squeezed.

View File

@ -811,6 +811,7 @@
* [`assert_global_step`](../../api_docs/python/contrib.framework.md#assert_global_step)
* [`assert_or_get_global_step`](../../api_docs/python/contrib.framework.md#assert_or_get_global_step)
* [`assert_same_float_dtype`](../../api_docs/python/contrib.framework.md#assert_same_float_dtype)
* [`assert_scalar`](../../api_docs/python/contrib.framework.md#assert_scalar)
* [`assert_scalar_int`](../../api_docs/python/contrib.framework.md#assert_scalar_int)
* [`assign_from_checkpoint`](../../api_docs/python/contrib.framework.md#assign_from_checkpoint)
* [`assign_from_checkpoint_fn`](../../api_docs/python/contrib.framework.md#assign_from_checkpoint_fn)
@ -821,6 +822,7 @@
* [`deprecated`](../../api_docs/python/contrib.framework.md#deprecated)
* [`deprecated_arg_values`](../../api_docs/python/contrib.framework.md#deprecated_arg_values)
* [`deprecated_args`](../../api_docs/python/contrib.framework.md#deprecated_args)
* [`filter_variables`](../../api_docs/python/contrib.framework.md#filter_variables)
* [`get_global_step`](../../api_docs/python/contrib.framework.md#get_global_step)
* [`get_graph_from_inputs`](../../api_docs/python/contrib.framework.md#get_graph_from_inputs)
* [`get_local_variables`](../../api_docs/python/contrib.framework.md#get_local_variables)
@ -843,6 +845,7 @@
* [`local_variable`](../../api_docs/python/contrib.framework.md#local_variable)
* [`model_variable`](../../api_docs/python/contrib.framework.md#model_variable)
* [`reduce_sum_n`](../../api_docs/python/contrib.framework.md#reduce_sum_n)
* [`remove_squeezable_dimensions`](../../api_docs/python/contrib.framework.md#remove_squeezable_dimensions)
* [`variable`](../../api_docs/python/contrib.framework.md#variable)
* [`VariableDeviceChooser`](../../api_docs/python/contrib.framework.md#VariableDeviceChooser)
* [`with_same_shape`](../../api_docs/python/contrib.framework.md#with_same_shape)