Neargye / hello_tf_c_api

Neural Network TensorFlow C API
MIT License
468 stars 134 forks source link

how to set TF_Operation(target_opers) in TF_SessionRun; #38

Closed youngallien closed 4 years ago

youngallien commented 4 years ago

hi , I am confused about TF_SessionRun and how to set target_opers and ntargets would you like to tell me how to set it?

Neargye commented 4 years ago

Hi, check https://github.com/Neargye/hello_tf_c_api/issues/24

youngallien commented 4 years ago

Thanks very much! i defined the graph through the tensorflow python API and turn it to pb model; but now , i can't use c++ to train my model (the "cost" is no change) as the following code: TF_SessionRun(m_session, nullptr, &m_inputs[0], &input_values[0], input_values.size(); &m_outputs[0], &output_values[0], output_values.size(), operations.data(), operations.size(), nullptr, m_status);

Neargye commented 4 years ago

@yangjituan you can also check https://gist.github.com/asimshankar/7c9f8a9b04323e93bb217109da8c7ad2.