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(dtype()).

doc_TensorFlow
2016-10-14 18:57:19
Comments
Leave a Comment

Please login to continue.