-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ValueError("Operation {} does not belong to given graph".format(op)) when running get walk ops functions #41
Comments
Thanks for reaching out @NicholasMcElroy! Might you have a self-contained piece of Python code that reproduces the problem you are seeing? |
It's a bit complex as this is a function that uses variables from another script, but here's the snippet I'm working on:
And here's where the function is called:
|
Sorry, I'm still having trouble reproducing this. Could you provide a stack trace so I can see which of the calls from |
I've been messing around with it a bit so the error I'm getting now is a little different, but here's the stack trace of what I'm getting now:
|
Sorry for the delay in getting back to this. The most recent stack trace seems to indicate that there's a problem in the conversion from protocol buffers to Could you try running your program against the code in that branch and seeing what error results? |
Hello,

I'm currently using your library to do some operations on the graph of a model in TensorFlow 2, and I'm having some issues with figuring out the proper way to convert a tensor to either a gde.Node or gde.Tensor object to use in the library's functions. I'm converting my tensors as follows:
gra is the name of my gde.Graph object, for reference. After converting the tensors this way, when I run get backward walk ops on my ys_g I get a placeholder operation, and when I run get forward walk ops on the xs_g I get ValueError("Operation {} does not belong to given graph".format(op)) as an error. Looking at the code in the util file I see that this is returned after checking that the op has a value for its graph attribute, so I'm guessing this is what's causing issues with my code. How can I make sure that this attribute gets a value when converting? Any help is appreciated, thank you!
The text was updated successfully, but these errors were encountered: