W3cubDocs

/TensorFlow C++

tensorflow::ops::Bitcast

#include <array_ops.h>

Bitcasts a tensor from one type to another without copying data.

Summary

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:

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

Public attributes

output

::tensorflow::Output output

Public functions

Bitcast

 Bitcast(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  DataType type
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

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