c++ - what's the difference between targes nodes and fetch nodes in tensorflow? -
in tensorflow, there function used rewrite original graph(rewritegraphforexecution):
status rewritegraphforexecution( graph* g, const gtl::arrayslice<string>& fed_outputs, const gtl::arrayslice<string>& fetch_outputs, const gtl::arrayslice<string>& target_node_names, const deviceattributes& device_info) {
the above code coming here confused exact difference between fetch_outputs , target_node_names.
thanks much, information appreciated!
this graphp may you.
and here header declaration,
// rewrite graph structure of "*g" deal feeding node // outputs, fetching node outputs, , running subset of // graph. "fed_outputs" , "fetch_outputs" both lists of // output tensor identifiers in form of // "<name>[:<optional_output_index>]", , "target_nodes_str" // lists of target node names in "*g" "g". // // in resulting graph "*g", output edges in "fed_outputs" have // been redirected special "_recv" nodes introduced graph. // if these fed nodes not needed in order compute effects // of nodes in "targets_nodes" , "fetch_outputs", these may // omitted graph. // // in resulting graph "*g", additional "_send" nodes connected // every output in "fetch_outputs". these "_send" nodes set // execute on device described device_info. // // on success, returns ok, , sets "*g" version of "*g" // represents portions of graph necessary producing // output of nodes listed in "target_node_names" , fetching // specific node outputs specified in "fetch_outputs". // // on failure, returns error status. possible errors include: // - fed output "node:output_index" not exist in "*g" // - fetch output "node:output_index" not exist in "*g" // - target node "node" not exist in "*g" status rewritegraphforexecution( graph* g, const gtl::arrayslice<string>& fed_outputs, const gtl::arrayslice<string>& fetch_outputs, const gtl::arrayslice<string>& target_node_names, const deviceattributes& device_info);
Comments
Post a Comment