Tried to convert a TensorFlow programme from Python to C++ and found no such class Placeholder in the latest documentation 1.12 and 1.3. Dug up the internet and found out that since version 1.7, the Placeholder class disappeared from official documentation. Even though, that class is still in TensorFlow library v1.12 v1.13 and I'm using it.
Placeholder is found in version 1.0 (array_ops)
http://docs1.w3cub.com/tensorflow~cpp/class/tensorflow/ops/placeholder
Still there in version 1.4 (array_ops)
http://docs2.w3cub.com/tensorflow~cpp/class/tensorflow/ops/placeholder
Still there in version 1.6 (array_ops)
http://htmlpreview.github.io/?https://github.com/tensorflow/docs/blob/r1.6/site/en/api_docs/cc/namespace/tensorflow/ops.html
And no more in version 1.7+
http://htmlpreview.github.io/?https://github.com/tensorflow/docs/blob/r1.7/site/en/api_docs/cc/namespace/tensorflow/ops.html
Also not found in latest version 1.13
https://www.tensorflow.org/api_docs/cc/group/array-ops
But this Placeholder class is back in version 2.0
https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/placeholder
Here's how I'm using Placeholder in C++:
Scope R = Scope::NewRootScope();
Placeholder X = Placeholder(R,DT_FLOAT);
What should be the replacement for the Placeholder above, any other ways to specify X?