tensorflow::Tensor::CopyFrom()

bool tensorflow::Tensor::CopyFrom(const Tensor &other, const TensorShape &shape) TF_MUST_USE_RESULT Copy the other tensor into this tensor and reshape it. This tensor shares other's underlying storage. Returns true iff other.shape() has the same number of elements of the given shape.

tensorflow::Tensor::BufferHash()

size_t tensorflow::Tensor::BufferHash() const

tensorflow::Tensor::bit_casted_tensor()

TTypes< T, NDIMS >::ConstTensor tensorflow::Tensor::bit_casted_tensor() const Return the tensor data to an Eigen::Tensor with the same size but a bitwise cast to the specified dtype T. Using a bitcast is useful for move and copy operations. NOTE: this is the same as tensor() except a bitcast is allowed.

tensorflow::Tensor::bit_casted_tensor()

TTypes< T, NDIMS >::Tensor tensorflow::Tensor::bit_casted_tensor() Return the tensor data to an Eigen::Tensor with the same size but a bitwise cast to the specified dtype T. Using a bitcast is useful for move and copy operations. NOTE: this is the same as tensor() except a bitcast is allowed.

tensorflow::Tensor::bit_casted_shaped()

TTypes< T, NDIMS >::ConstTensor tensorflow::Tensor::bit_casted_shaped(gtl::ArraySlice< int64 > new_sizes) const Return the tensor data to an Eigen::Tensor with the new shape specified in new_sizes and cast to a new dtype T. Using a bitcast is useful for move and copy operations. The allowed bitcast is the only difference from shaped().

tensorflow::Tensor::bit_casted_shaped()

TTypes< T, NDIMS >::Tensor tensorflow::Tensor::bit_casted_shaped(gtl::ArraySlice< int64 > new_sizes) Return the tensor data to an Eigen::Tensor with the new shape specified in new_sizes and cast to a new dtype T. Using a bitcast is useful for move and copy operations. The allowed bitcast is the only difference from shaped().

tensorflow::Tensor::AsProtoTensorContent()

void tensorflow::Tensor::AsProtoTensorContent(TensorProto *proto) const

tensorflow::Tensor::AsProtoField()

void tensorflow::Tensor::AsProtoField(TensorProto *proto) const Fills in proto with *this tensor's content. AsProtoField() fills in the repeated field for proto.dtype(), while AsProtoTensorContent() encodes the content in proto.tensor_content() in a compact form.

tensorflow::Tensor

Represents an n-dimensional array of values. Member Details tensorflow::Tensor::Tensor() Creates a 1-dimensional, 0-element float tensor. The returned Tensor is not a scalar (shape {}), but is instead an empty one-dimensional Tensor (shape {0}, NumElements() == 0). Since it has no elements, it does not need to be assigned a value and is initialized by default ( IsInitialized() is true). If this is undesirable, consider creating a one-element scalar which does require initialization: tensorflow:

tensorflow::Status::Update()

void tensorflow::Status::Update(const Status &new_status) If ok(), stores new_status into *this. If !ok(), preserves the current status, but may augment with additional information about new_status. Convenient way of keeping track of the first error encountered. Instead of: if (overall_status.ok()) overall_status = new_status Use: overall_status.Update(new_status);