I'm loading a V2 checkpoint with the TensorFlow 1.4 C++ API, which is fairly straightforward following this answer: https://stackoverflow.com/a/43639305/9015277 . However, this answer does not specify the how the inputs can be fed to the loaded network.
In TF 1.4 inputs for ClientSession::Run()
can be specified using a FeedType object, which is defined as:
std::unordered_map< Output, Input::Initializer, OutputHash > FeedType
Here each Output
key represents a tensor value produced by an OP. With a graph built in the C++ API I guess it is fairly simple to just pass the input placeholder, but how can I do the same with a graph loaded from a V2 checkpoint?
In this example (which using the r0.12 api I believe) https://github.com/tensorflow/tensorflow/blob/ab0fcaceda001825654424bf18e8a8e0f8d39df2/tensorflow/examples/label_image/main.cc#L346 it is straightforward again, the layers are just given with their names. But how can I do the same with the new API?