-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Refactor sonnx, test cases and examples #703
Conversation
This pull request introduces 7 alerts when merging b6a8754 into db1846d - view on LGTM.com new alerts:
|
This pull request introduces 10 alerts and fixes 13 when merging 7e47512 into db1846d - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 10 alerts and fixes 13 when merging 5fccbba into db1846d - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 5 alerts and fixes 1 when merging 8849982 into db1846d - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 7 alerts and fixes 1 when merging 54458cb into 84de1af - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 7 alerts and fixes 1 when merging cfa8878 into 84de1af - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 7 alerts and fixes 1 when merging 03c28ca into 84de1af - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 2 alerts and fixes 1 when merging 27051ae into bec1964 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 2 alerts and fixes 1 when merging 70a0d7e into bec1964 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 1 when merging 486e1d6 into bec1964 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 15 alerts and fixes 1 when merging f83b286 into bec1964 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 11 alerts and fixes 1 when merging 223b9e3 into dd18aff - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 3 alerts and fixes 1 when merging 7e5bf26 into dd18aff - view on LGTM.com new alerts:
fixed alerts:
|
This pull request fixes 1 alert when merging fb76557 into dd18aff - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 44796e6 into dd18aff - view on LGTM.com fixed alerts:
|
super(SONNXModel, self).__init__() | ||
self.sg_ir = prepare(onnx_model) | ||
for node, operator in self.sg_ir.layers: | ||
self.__dict__[node.name] = operator |
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.
is each operator here a Layer instance?
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.
No, you can check the dict of _rename_operators
, for the normal operator, it creates the operator from the autograd.py
, and for the layer operator, it creates it from layer.py
.
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.
if operator is not a Layer instance, then the save_states and load_states cannot work, which works by saving the states of the sub-layers.
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.
At Line 2035-2040, the code will check the type of the instance, if it's from autograd, it will call setattr(op, key, value)
, otherwise will call op.set_states(**states)
.
This pull request fixes 1 alert when merging 00b65b2 into dd18aff - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging e93770b into dd18aff - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging de46a51 into ede4a3e - view on LGTM.com fixed alerts:
|
c7b24fc
to
61e424e
Compare
This pull request fixes 1 alert when merging 61e424e into ede4a3e - view on LGTM.com fixed alerts:
|
@nudles ready to merge |
This pull request fixes 1 alert when merging 6d46112 into ede4a3e - view on LGTM.com fixed alerts:
|
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.
after we convert onnx model to sonnx model and finish the training, can we save the sonnx model as onnx model?
This pull request fixes 1 alert when merging c563ed3 into ede4a3e - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 6af18ba into ede4a3e - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 43addc7 into ede4a3e - view on LGTM.com fixed alerts:
|
todo-list:
sonnx to suit new API(almost done),sonnx to use new autograd API,test cases,debug test operations,debug sonnx backend test cases,examplesadd re-training examples