Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ use of Eigen in tensorflow

What is the relation between tensorflow and Eigen, particularly regarding the tensor datastructures?

There are some older quotations (e.g. here) which state that tensorflow is using Eigen extensively (afaik a tensorflow guy has extended the Eigen code). More recent tensorflow documentation, however, seems to not explicitly refer to Eigen.

Are the two tensor structures identical? Are they being updated concurrently? Is there any (possibly future) disadvantage in using the Eigen::tensor over the tensorflow::tensor?

like image 911
davidhigh Avatar asked Feb 24 '17 15:02

davidhigh


People also ask

Does Tensorflow use Eigen?

tensorflow uses the Tensor module of Eigen (which is mostly maintained by the main author of tensorflow).

Is C++ a Tensorflow?

The C++ API (and the backend of the system) is in tensorflow/core . Right now, only the C++ Session interface, and the C API are being supported. You can use either of these to execute TensorFlow graphs that have been built using the Python API and serialized to a GraphDef protocol buffer.


1 Answers

tensorflow::tensor is just a thin wrapper around Eigen::Tensor with limited high-level features only. You can access to the underlying Eigen::Tensor of a tensorflow::tensor using the tensor() method. I guess that this information also solve your last two questions.

like image 170
ggael Avatar answered Oct 09 '22 00:10

ggael