#include <array_ops.h>
Bitcasts a tensor from one type to another without copying data.
Given a tensor input
, this operation returns a tensor that has the same buffer data as input
with datatype type
.
If the input datatype T
is larger than the output datatype type
then the shape changes from [...] to [..., sizeof(T
)/sizeof(type
)].
If T
is smaller than type
, the operator requires that the rightmost dimension be equal to sizeof(type
)/sizeof(T
). The shape then goes from [..., sizeof(type
)/sizeof(T
)] to [...].
NOTE: Bitcast is implemented as a low-level cast, so machines with different endian orderings will give different results.
Arguments:
Returns:
Output
: The output tensor. Constructors and Destructors | |
---|---|
Bitcast(const ::tensorflow::Scope & scope, ::tensorflow::Input input, DataType type) |
Public attributes | |
---|---|
output |
Public functions | |
---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const |
::tensorflow::Output output
Bitcast( const ::tensorflow::Scope & scope, ::tensorflow::Input input, DataType type )
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output() const
© 2017 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/api_docs/cc/class/tensorflow/ops/bitcast.html