HiPipe
0.7.0
C++17 data pipeline with Python bindings.
|
Functions | |
std::unique_ptr<::tensorflow::Session > | hipipe::tensorflow::load_graph (std::experimental::filesystem::path graph_file_name) |
Make a session out of tensorflow frozen graph. More... | |
template<typename... OutTs, typename... InTs> | |
std::tuple< std::tuple< std::vector< OutTs >... >, std::vector< std::vector< long > > > | hipipe::tensorflow::run_graph (::tensorflow::Session &session, const std::vector< std::string > &input_names, const std::tuple< std::vector< InTs >... > &input_data, const std::vector< std::vector< long >> &input_shapes, const std::vector< std::string > &output_names) |
Run a session and feed its graph with the provided inputs. More... | |
std::unique_ptr<::tensorflow::Session> hipipe::tensorflow::load_graph | ( | std::experimental::filesystem::path | graph_file_name | ) |
Make a session out of tensorflow frozen graph.
graph_file_name | File with the frozen graph. |
std::tuple<std::tuple<std::vector<OutTs>...>, std::vector<std::vector<long> > > hipipe::tensorflow::run_graph | ( | ::tensorflow::Session & | session, |
const std::vector< std::string > & | input_names, | ||
const std::tuple< std::vector< InTs >... > & | input_data, | ||
const std::vector< std::vector< long >> & | input_shapes, | ||
const std::vector< std::string > & | output_names | ||
) |
Run a session and feed its graph with the provided inputs.
The session can be obtained using load_graph().
The lengths of input_names, input_shapes and input_data arguments have to be equal. The lengths of output_names and the OutT template parameter list have to be equal.
session | Pointer to the session to be run. |
input_names | Names of the input variables for the TF graph. |
input_data | The data to be fed to the selected input variables. |
input_shapes | Shapes of the input variables including the batch dimension. |
output_names | The names of the variables to be extracted from the TF graph. |
Definition at line 49 of file run_graph.hpp.