Skip to content

Commit

Permalink
Update generated Python Op docs.
Browse files Browse the repository at this point in the history
Change: 136558601
  • Loading branch information
tensorflower-gardener committed Oct 19, 2016
1 parent 8fa9b94 commit 273f59a
Show file tree
Hide file tree
Showing 6 changed files with 174 additions and 58 deletions.
14 changes: 7 additions & 7 deletions tensorflow/g3doc/api_docs/python/contrib.distributions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20217,8 +20217,8 @@ Additional documentation from `TransformedDistribution`:

##### <b>`condition_kwargs`</b>:

* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.

##### Args:

Expand Down Expand Up @@ -20335,8 +20335,8 @@ Additional documentation from `TransformedDistribution`:

##### <b>`condition_kwargs`</b>:

* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.

##### Args:

Expand Down Expand Up @@ -20419,8 +20419,8 @@ Implements `(log o p o g^{-1})(y) + (log o det o J o g^{-1})(y)`,

##### <b>`condition_kwargs`</b>:

* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.

##### Args:

Expand Down Expand Up @@ -20458,8 +20458,8 @@ Additional documentation from `TransformedDistribution`:

##### <b>`condition_kwargs`</b>:

* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.

##### Args:

Expand Down Expand Up @@ -20611,8 +20611,8 @@ Implements `p(g^{-1}(y)) det|J(g^{-1}(y))|`, where `g^{-1}` is the

##### <b>`condition_kwargs`</b>:

* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.

##### Args:

Expand Down Expand Up @@ -20665,8 +20665,8 @@ Samples from the base distribution and then passes through

##### <b>`condition_kwargs`</b>:

* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.

##### Args:

Expand Down Expand Up @@ -20714,8 +20714,8 @@ Additional documentation from `TransformedDistribution`:

##### <b>`condition_kwargs`</b>:

* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.

##### Args:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ Additional documentation from `TransformedDistribution`:
##### <b>`condition_kwargs`</b>:
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
##### Args:
Expand Down Expand Up @@ -300,8 +300,8 @@ Additional documentation from `TransformedDistribution`:
##### <b>`condition_kwargs`</b>:
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
##### Args:
Expand Down Expand Up @@ -384,8 +384,8 @@ Implements `(log o p o g^{-1})(y) + (log o det o J o g^{-1})(y)`,
##### <b>`condition_kwargs`</b>:
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
##### Args:
Expand Down Expand Up @@ -423,8 +423,8 @@ Additional documentation from `TransformedDistribution`:
##### <b>`condition_kwargs`</b>:
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
##### Args:
Expand Down Expand Up @@ -576,8 +576,8 @@ Implements `p(g^{-1}(y)) det|J(g^{-1}(y))|`, where `g^{-1}` is the
##### <b>`condition_kwargs`</b>:
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
##### Args:
Expand Down Expand Up @@ -630,8 +630,8 @@ Samples from the base distribution and then passes through
##### <b>`condition_kwargs`</b>:
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
##### Args:
Expand Down Expand Up @@ -679,8 +679,8 @@ Additional documentation from `TransformedDistribution`:
##### <b>`condition_kwargs`</b>:
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
* <b>`bijector_kwargs`</b>: Python dictionary of arg names/values forwarded to the bijector.
* <b>`distribution_kwargs`</b>: Python dictionary of arg names/values forwarded to the distribution.
##### Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,27 @@

Computes a 1-D convolution given 3-D input and filter tensors.

Given an input tensor of shape [batch, in_width, in_channels]
Given an input tensor of shape
[batch, in_width, in_channels]
if data_format is "NHWC", or
[batch, in_channels, in_width]
if data_format is "NCHW",
and a filter / kernel tensor of shape
[filter_width, in_channels, out_channels], this op reshapes
the arguments to pass them to conv2d to perform the equivalent
convolution operation.

Internally, this op reshapes the input tensors and invokes
`tf.nn.conv2d`. A tensor of shape [batch, in_width, in_channels]
is reshaped to [batch, 1, in_width, in_channels], and the filter
is reshaped to [1, filter_width, in_channels, out_channels].
The result is then reshaped back to [batch, out_width, out_channels]
(where out_width is a function of the stride and padding as in
conv2d) and returned to the caller.
Internally, this op reshapes the input tensors and invokes `tf.nn.conv2d`.
For example, if `data_format` does not start with "NC", a tensor of shape
[batch, in_width, in_channels]
is reshaped to
[batch, 1, in_width, in_channels],
and the filter is reshaped to
[1, filter_width, in_channels, out_channels].
The result is then reshaped back to
[batch, out_width, out_channels]
(where out_width is a function of the stride and padding as in conv2d) and
returned to the caller.

##### Args:

Expand All @@ -35,3 +43,8 @@ conv2d) and returned to the caller.

A `Tensor`. Has the same type as input.

##### Raises:


* <b>`ValueError`</b>: if `data_format` is invalid.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### `tf.nn.convolution(input, filter, padding, strides=None, dilation_rate=None, name=None)` {#convolution}
### `tf.nn.convolution(input, filter, padding, strides=None, dilation_rate=None, name=None, data_format=None)` {#convolution}

Computes sums of N-D convolutions (actually cross-correlation).

Expand All @@ -8,7 +8,8 @@ convolution, based on the French word "trous" meaning holes in English) via
the optional `dilation_rate` parameter. Currently, however, output striding
is not supported for atrous convolutions.

Specifically, given rank (N+2) `input` Tensor of shape
Specifically, in the case that `data_format` does not start with "NC", given
a rank (N+2) `input` Tensor of shape

[num_batches,
input_spatial_shape[0],
Expand All @@ -33,25 +34,36 @@ position (x[0], ..., x[N-1]):

sum_{z[0], ..., z[N-1], q}

filters[z[0], ..., z[N-1], q, k] *
filter[z[0], ..., z[N-1], q, k] *
padded_input[b,
x[0]*strides[0] + dilation_rate[0]*z[0],
...,
x[N-1]*strides[N-1] + dilation_rate[N-1]*z[N-1],
q],
q]

where `padded_input` is obtained by zero padding the input using an effective
spatial filter shape of `(spatial_filter_shape-1) * dilation_rate + 1` and
output striding `strides` as described in the
[comment here](https://www.tensorflow.org/api_docs/python/nn.html#convolution).

In the case that `data_format` does start with `"NC"`, the `input` and output
(but not the `filter`) are simply transposed as follows:

convolution(input, data_format, **kwargs) =
tf.transpose(convolution(tf.transpose(input, [0] + range(2,N+2) + [1]),
**kwargs),
[0, N+1] + range(1, N+1))

It is required that 1 <= N <= 3.

##### Args:


* <b>`input`</b>: An N-D `Tensor` of type `T`, of shape
`[batch_size] + input_spatial_shape + [in_channels]`.
`[batch_size] + input_spatial_shape + [in_channels]` if data_format does
not start with "NC" (default), or
`[batch_size, in_channels] + input_spatial_shape` if data_format starts
with "NC".
* <b>`filter`</b>: An N-D `Tensor` with the same type as `input` and shape
`spatial_filter_shape + [in_channels, out_channels]`.
* <b>`padding`</b>: A string, either `"VALID"` or `"SAME"`. The padding algorithm.
Expand All @@ -67,13 +79,24 @@ It is required that 1 <= N <= 3.
filter in each spatial dimension i. If any value of dilation_rate is > 1,
then all values of strides must be 1.
* <b>`name`</b>: Optional name for the returned tensor.
* <b>`data_format`</b>: A string or None. Specifies whether the channel dimension of
the `input` and output is the last dimension (default, or if `data_format`
does not start with "NC"), or the second dimension (if `data_format`
starts with "NC"). For N=1, the valid values are "NWC" (default) and
"NCW". For N=2, the valid values are "NHWC" (default) and "NCHW". For
N=3, the valid value is "NDHWC".

##### Returns:

A `Tensor` with the same type as `value` of shape
A `Tensor` with the same type as `input` of shape

`[batch_size] + output_spatial_shape + [out_channels]`

if data_format is None or does not start with "NC", or

`[batch_size] + output_spatial_shape + [out_channels]`,
`[batch_size, out_channels] + output_spatial_shape`

if data_format starts with "NC",
where `output_spatial_shape` depends on the value of `padding`.

If padding == "SAME":
Expand All @@ -88,6 +111,6 @@ It is required that 1 <= N <= 3.
##### Raises:


* <b>`ValueError`</b>: If input/output depth does not match `filter` shape, or if
padding is other than `"VALID"` or `"SAME"`.
* <b>`ValueError`</b>: If input/output depth does not match `filter` shape, if padding
is other than `"VALID"` or `"SAME"`, or if data_format is invalid.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### `tf.nn.pool(input, window_shape, pooling_type, padding, dilation_rate=None, strides=None, name=None)` {#pool}
### `tf.nn.pool(input, window_shape, pooling_type, padding, dilation_rate=None, strides=None, name=None, data_format=None)` {#pool}

Performs an N-D pooling operation.

Computes for
In the case that `data_format` does not start with "NC", computes for
0 <= b < batch_size,
0 <= x[i] < output_spatial_shape[i],
0 <= c < num_channels:
Expand All @@ -20,12 +20,22 @@ and pad_before is defined based on the value of `padding` as described in the
[comment here](https://www.tensorflow.org/api_docs/python/nn.html#convolution).
The reduction never includes out-of-bounds positions.

In the case that `data_format` starts with `"NC"`, the `input` and output are
simply transposed as follows:

pool(input, data_format, **kwargs) =
tf.transpose(pool(tf.transpose(input, [0] + range(2,N+2) + [1]),
**kwargs),
[0, N+1] + range(1, N+1))

##### Args:


* <b>`input`</b>: Tensor of rank N+2, of shape
[batch_size] + input_spatial_shape + [num_channels].
Pooling happens over the spatial dimensions only.
`[batch_size] + input_spatial_shape + [num_channels]` if data_format does
not start with "NC" (default), or
`[batch_size, num_channels] + input_spatial_shape` if data_format starts
with "NC". Pooling happens over the spatial dimensions only.
* <b>`window_shape`</b>: Sequence of N ints >= 1.
* <b>`pooling_type`</b>: Specifies pooling operation, must be "AVG" or "MAX".
* <b>`padding`</b>: The padding algorithm, must be "SAME" or "VALID".
Expand All @@ -37,11 +47,23 @@ The reduction never includes out-of-bounds positions.
If any value of strides is > 1, then all values of dilation_rate must be
1.
* <b>`name`</b>: Optional. Name of the op.
* <b>`data_format`</b>: A string or None. Specifies whether the channel dimension of
the `input` and output is the last dimension (default, or if `data_format`
does not start with "NC"), or the second dimension (if `data_format`
starts with "NC"). For N=1, the valid values are "NWC" (default) and
"NCW". For N=2, the valid values are "NHWC" (default) and "NCHW". For
N=3, the valid value is "NDHWC".

##### Returns:

Tensor of rank N+2, of shape
[batch_size] + output_spatial_shape + [num_channels],
[batch_size] + output_spatial_shape + [num_channels]

if data_format is None or does not start with "NC", or

[batch_size, num_channels] + output_spatial_shape

if data_format starts with "NC",
where `output_spatial_shape` depends on the value of padding:

If padding = "SAME":
Expand Down
Loading

0 comments on commit 273f59a

Please sign in to comment.