#include <nn_ops.h>
Computes a N-D convolution given (N+1+batch_dims)-D input and (N+2)-D filter tensors.
General function for computing a N-D convolution. It is required that 1 <= N <= 3.
Args:
batch_shape + spatial_shape + [in_channels] in the case that channels_last_format = true or shape batch_shape + [in_channels] + spatial_shape if channels_last_format = false. spatial_shape is N-dimensional with N=2 or N=3. Also note that batch_shape is dictated by the parameter batch_dims and defaults to 1.(N+2)-DTensor with the same type as input and shape spatial_filter_shape + [in_channels, out_channels], where spatial_filter_shape is N-dimensional with N=2 or N=3.N+2. The stride of the sliding window for each dimension of input. Must have strides[0] = strides[N+1] = 1.Optional attributes (see Attrs):
padding is "EXPLICIT", the list of explicit padding amounts. For the ith dimension, the amount of padding inserted before and after the dimension is explicit_paddings[2 * i] and explicit_paddings[2 * i + 1], respectively. If padding is not "EXPLICIT", explicit_paddings must be empty.CHANNELS_FIRST, uses NHWC (2D) / NDHWC (3D) or if CHANNELS_LAST, uses NCHW (2D) / NCDHW (3D).N+2. The dilation factor for each dimension of input. If set to k > 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of channels_last_format, see above for details. Dilations in the batch and depth dimensions must be 1.filters / groups filters. The output is the concatenation of all the groups results along the channel axis. Input channels and filters must both be divisible by groups.Returns:
Output: A (N+1+batch_dims)-D tensor. The dimension order is determined by the value of channels_last_format, see below for details. | Constructors and Destructors | |
|---|---|
Conv(const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding) | |
Conv(const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding, const Conv::Attrs & attrs) |
| Public attributes | |
|---|---|
operation | |
output | |
| Public functions | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
| Public static functions | |
|---|---|
BatchDims(int64 x) | |
DataFormat(StringPiece x) | |
Dilations(const gtl::ArraySlice< int > & x) | |
ExplicitPaddings(const gtl::ArraySlice< int > & x) | |
Groups(int64 x) | |
| Structs | |
|---|---|
| tensorflow::ops::Conv::Attrs | Optional attribute setters for Conv. |
Operation operation
::tensorflow::Output output
Conv( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding )
Conv( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding, const Conv::Attrs & attrs )
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Attrs BatchDims( int64 x )
Attrs DataFormat( StringPiece x )
Attrs Dilations( const gtl::ArraySlice< int > & x )
Attrs ExplicitPaddings( const gtl::ArraySlice< int > & x )
Attrs Groups( int64 x )
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/conv