-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[relay][frontend] Return module from frontend parsers #3353
Conversation
please rebase against the current master |
assert isinstance(expr, Expr) | ||
self.mod[self.mod.entry_func] = expr | ||
def _make_executor(self, expr=None): | ||
expr = expr if expr else self.mod |
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.
I think we should try to factor all this normalization code into one spot.
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.
IMO we should only take module and remove expr related code
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.
I also think we probably only should just take a module, but it looks we need to refactor the interpreter and the graph_runtime somehow.
@zhiics please rebase against the latest master |
#3346
This PR returns
Module
instead ofExpr
from the frontend converters because:Module
toModule
Expr
could be error-prone. Or we should really return a function with closures. Returning module should be more convenient.Necessary changes are made in various executors to take both module and expr.
Covered converters:
TensorFlow
TFLite
Keras
Caffe2
MXNet
Darknet
CoreML
ONNX