-
Notifications
You must be signed in to change notification settings - Fork 750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tensorflow jni: Expose TF_Graph->graph and TF_Operation->node? #585
Comments
Yes, we can, we just need to include |
Thanks for the notification @saudet . For the supported, stable API surface for TensorFlow in C (defined in @wumo : If you have a need for graph mutation, we'd like to better understand that and figure out an alternative to graph mutation. |
@asimshankar I was to reimplement the |
@wumo I've released version 1.4.2 with bindings for |
I'm trying to reimplement some Tensorflow Python functions in Java. I found that some functions are provided by Tensorflow C API but not by C++ API (e.g.
TF_GraphGetTensorShape
, you cannot find an equivalent C++ class/function that does the same thing), and some functions are provided by C++ API but not by C API (e.g.Graph::UpdateEdge
, you cannot find an equivalent C function which does the same thing).Under the hood, C or C++ API are calling each other's functions through some conversion functions (e.g.
TF_AddGradients
uses C++'sAddSymbolicGradients
which requires convertingTF_Output
toclass Output
and vice versa). We can do some C/C++ conversion using only current JNI api. But now I cannot implementUpdateEdge
when using C API (because we only haveTF_Graph
, the fieldgraph
is not accessible by JNI API) . So if we can get the innerTF_Graph->graph
field, then we can use C++'sGraph::UpdateEdge
function to update the graph edge which is constructed by C API.Will you consider exposing some other struct fields like this?
The text was updated successfully, but these errors were encountered: