tensorflow::ops::EnsureShape

#include <array_ops.h>

Ensures that the tensor's shape matches the expected shape.

Summary

Raises an error if the input tensor's shape does not match the specified shape. Returns the input tensor otherwise.

Arguments:

  • scope: A Scope object
  • input: A tensor, whose shape is to be validated.
  • shape: The expected (possibly partially specified) shape of the input tensor.

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

Public attributes

operation

Operation operation

output

::tensorflow::Output output

Public functions

EnsureShape

 EnsureShape(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  PartialTensorShape shape
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/ensure-shape