-
Notifications
You must be signed in to change notification settings - Fork 299
reuse sess in backend #273
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
base: main
Are you sure you want to change the base?
Conversation
chinhuang007
left a comment
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.
Can we simply use self._sess, rather than additional sess?
|
@chinhuang007 We want tf_rep.run be stateless. |
onnx_tf/backend_rep.py
Outdated
| :returns: A Session object. | ||
| """ | ||
| return tf.Session(self.graph) |
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.
Shouldn't this be tf.Session(graph=self.graph)?
chinhuang007
left a comment
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.
LGTM
|
Is there any chance this PR gets accepted? I was actually facing the exact problem this PR is trying to fix. |
# Conflicts: # onnx_tf/backend_rep.py
#271