-
Notifications
You must be signed in to change notification settings - Fork 200
Migrate from TF_DeprecatedSession to TF_Session #285
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
Conversation
7825a9a
to
ee69aa3
Compare
With my very limited understanding of TensorFlow, I suspect that the old call to |
This is probably where the errors are coming from: The "old" ExtendGraph call ended up here: |
I will try using TF_NewOperation calls instead of using a GraphDef as intermediate. |
That might be a lot of work. If I remember correctly, a lot of the haskell code was designed exploiting the fact that we could build up a graph of protos (without having to interact with the C API or do anything "impure") and then just chuck it all into tensorflow at once via Not sure if it is feasible, but maybe at the point where |
Thanks for the feedback; I'll give it a try to see if it's feasible. I'm currently using the |
It is indeed a lot of work. I will try using the TF_GraphImportGraphDef approach again, but this time with an input mapping for existing nodes in the graph. |
ee69aa3
to
382b9c1
Compare
Passing an input map seems to work. |
@fkm3 Thanks for looking into this PR; can you tell something about the CI failure? |
It is just some warnings-as-errors, you should be able to reproduce using the
|
382b9c1
to
9c467ed
Compare
Oops, thought I checked that. Fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for figuring this out. I think a handful of people including myself have considered doing this and bounced off it.
9c467ed
to
f8edd59
Compare
Instead of calling TF_ExtendGraph, we call TF_GraphImportGraphDef and pass an input map for all existing nodes in the graph.
e928ed0
to
80ce0d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fkm3 I think I've addressed your feedback, what do you think of the current PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
This is a prerequisite for supporting SavedModel.