tensorflow::TensorShape

Member Details uint8 tensorflow::TensorShape::buf[16][16] Rep64* tensorflow::TensorShape::unused_aligner tensorflow::TensorShape::TensorShape(gtl::ArraySlice< int64 > dim_sizes) Construct a TensorShape from the provided sizes. REQUIRES: dim_sizes[i] >= 0 tensorflow::TensorShape::TensorShape(std::initializer_list< int64 > dim_sizes) tensorflow::TensorShape::TensorShape(const TensorShapeProto &proto) REQUIRES: IsValid(proto) tensorflow::TensorShape::TensorShape() Create a tenso

tensorflow::Tensor::vec()

TTypes<T>::ConstVec tensorflow::Tensor::vec() const Const versions of all the methods above.

tensorflow::Tensor::vec()

TTypes<T>::Vec tensorflow::Tensor::vec() Return the tensor data as an Eigen::Tensor with the type and sizes of this Tensor. Use these methods when you know the data type and the number of dimensions of the Tensor and you want an Eigen::Tensor automatically sized to the Tensor sizes. The implementation check fails if either type or sizes mismatch. Example: Tensor my_mat(...built with Shape{rows: 3, cols: 5}...); auto mat = my_mat.matrix<T>(); // 2D Eigen::Tensor, 3 x 5. auto mat

tensorflow::Tensor::UnsafeCopyFromInternal()

void tensorflow::Tensor::UnsafeCopyFromInternal(const Tensor &, const TensorShape &) Copy the other tensor into this tensor and reshape it and reinterpret the buffer's datatype. This tensor shares other's underlying storage.

tensorflow::Tensor::unaligned_shaped()

TTypes< T, NDIMS >::UnalignedConstTensor tensorflow::Tensor::unaligned_shaped(gtl::ArraySlice< int64 > new_sizes) const

tensorflow::Tensor::unaligned_shaped()

TTypes< T, NDIMS >::UnalignedTensor tensorflow::Tensor::unaligned_shaped(gtl::ArraySlice< int64 > new_sizes)

tensorflow::Tensor::unaligned_flat()

TTypes<T>::UnalignedConstFlat tensorflow::Tensor::unaligned_flat() const

tensorflow::Tensor::unaligned_flat()

TTypes<T>::UnalignedFlat tensorflow::Tensor::unaligned_flat()

tensorflow::Tensor::TotalBytes()

size_t tensorflow::Tensor::TotalBytes() const Returns the estimated memory usage of this tensor.

tensorflow::Tensor::tensor_data()

StringPiece tensorflow::Tensor::tensor_data() const Returns a StringPiece mapping the current tensor's buffer. The returned StringPiece may point to memory location on devices that the CPU cannot address directly. NOTE: The underlying tensor buffer is refcounted, so the lifetime of the contents mapped by the StringPiece matches the lifetime of the buffer; callers should arrange to make sure the buffer does not get destroyed while the StringPiece is still used. REQUIRES: DataTypeCanUseMemcpy(dt