#include <array_ops.h>
Ensures that the tensor's shape matches the expected shape.
Raises an error if the input tensor's shape does not match the specified shape. Returns the input tensor otherwise.
Arguments:
Returns:
Output
: A tensor with the same shape and contents as the input tensor or value. Constructors and Destructors | |
---|---|
EnsureShape(const ::tensorflow::Scope & scope, ::tensorflow::Input input, PartialTensorShape shape) |
Public attributes | |
---|---|
operation | |
output |
Public functions | |
---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const |
Operation operation
::tensorflow::Output output
EnsureShape( const ::tensorflow::Scope & scope, ::tensorflow::Input input, PartialTensorShape shape )
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output() const
© 2020 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/versions/r2.4/api_docs/cc/class/tensorflow/ops/ensure-shape