#include <nn_ops.h>
Permute input tensor from src_format to dst_format.
Given source and destination format strings of length n=4 or 5, the input tensor must be a vector of size n or n-2, or a 2D tensor of shape (n, 2) or (n-2, 2).
If the first dimension of the input tensor is n-2, it is assumed that non-spatial dimensions are omitted (i.e N, C).
For example, with src_format of NHWC, dst_format of NCHW, and input:
[1, 2, 3, 4]
[1, 4, 2, 3]
src_format
NDHWC
dst_format
NCDHW
[[1, 6], [2, 7], [3, 8], [4, 9], [5, 10]]
[[1, 6], [5, 10], [2, 7], [3, 8], [4, 9]]
src_format
NHWC
dst_format
NCHW
[1, 2]
[1, 2]
Args:
Optional attributes (see Attrs):
Returns:
| Constructors and Destructors | |
|---|---|
DataFormatVecPermute(const ::tensorflow::Scope & scope, ::tensorflow::Input x) | |
DataFormatVecPermute(const ::tensorflow::Scope & scope, ::tensorflow::Input x, const DataFormatVecPermute::Attrs & attrs) |
| Public attributes | |
|---|---|
operation | |
y | |
| Public functions | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
| Public static functions | |
|---|---|
DstFormat(StringPiece x) | |
SrcFormat(StringPiece x) | |
| Structs | |
|---|---|
| tensorflow::ops::DataFormatVecPermute::Attrs | Optional attribute setters for DataFormatVecPermute. |
Operation operation
::tensorflow::Output y
DataFormatVecPermute( const ::tensorflow::Scope & scope, ::tensorflow::Input x )
DataFormatVecPermute( const ::tensorflow::Scope & scope, ::tensorflow::Input x, const DataFormatVecPermute::Attrs & attrs )
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Attrs DstFormat( StringPiece x )
Attrs SrcFormat( StringPiece 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/data-format-vec-permute