You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do I run an operation which produces no output? I'm trying to run a graph built using the python api, which uses the python method initialize_global_variables. I figured a way to do this was to run the resulting Tensor operation by getting its name (which is init). This leads to the following C# code:
{TensorFlow.TFException: Tried to fetch data for 'init_1:0', which produces no output. To run to a node but not fetch any data, pass 'init_1:0' as an argument to the 'target_node_names' argument of the Session::Run API.
I can't see a straightforward way of doing this, unless I'm missing something?
The text was updated successfully, but these errors were encountered:
I've actually solved my specific problem (by RTFM), I wasn't storing all the variables from my model on the python side. Storing everything by making use of the freeze_graph functionality creates a GraphDef that contains all the variables as constants. I've put a gist for doing this here, in case any other tensorflow novices end up running into the same hurdle.
Regardless, I'm still curious as to how one would run an operation with no output from TensorflowSharp?
How do I run an operation which produces no output? I'm trying to run a graph built using the python api, which uses the python method
initialize_global_variables
. I figured a way to do this was to run the resulting Tensor operation by getting its name (which isinit
). This leads to the following C# code:This results in the following exception:
I can't see a straightforward way of doing this, unless I'm missing something?
The text was updated successfully, but these errors were encountered: