-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
Hi @yifeim could you please re-trigger CI to ensure that the build succeeds? |
@mxnet-label-bot add [pr-work-in-progress] |
@mxnet-label-bot update [pr-awaiting-review, gluon] |
@@ -28,7 +28,9 @@ python train.py --cuda --tied --nhid 650 --emsize 650 --epochs 40 --dropout 0.5 | |||
``` | |||
python train.py --cuda --tied --nhid 1500 --emsize 1500 --epochs 60 --dropout 0.65 # Test ppl of 88.42 | |||
``` | |||
|
|||
``` | |||
python train.py --export-only # hybridize and export model graph (requires mxboard) |
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.
Please add instruction to install mxboard
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.
added link and made it outside of the main codes.
parser.add_argument('--static-shape', action='store_true', | ||
help='whether to use static-shape hybridize in mxnet>=1.3') | ||
parser.add_argument('--export-only', action='store_true', | ||
help='export a symbol graph and exit') |
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.
Please mention the default values for all of these arguments
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.
Added defaults as directed.
@roywei for review |
Is this related to my PR?
|
@yifeim Thanks for the contribution. Is there any performance improvement after hybridize? Btw, you can trigger CI again by rebase or push an empty commit. |
I did not see any performance improvement after hybridization. My guess is
that the computations are already elementary and asynchronous.
…On Mon, Dec 10, 2018 at 11:45 PM Lai Wei ***@***.***> wrote:
@yifeim <https://github.com/yifeim> Thanks for the contribution. Is there
any performance improvement after hybridize? Btw, you can trigger CI again
by rebase or push an empty commit.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13244 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIiQ6ldjvJn0DOETJVQSpXc3om97e4f2ks5u3zhVgaJpZM4Ya48l>
.
|
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 your contributions. 2 questions.
- Why should Hybridize even be an option? Why can't we just have it as default?
- export only is confusing or mis-leading. export is referred to a model (network + params) not just network. And, why is this option required?
1. As noted in both README and help strings, hybridizing an RNN is not
supported in mxnet<=1.2.
2. Export is the most obvious way for me to dump a network, unless you
recommend a different approach that I am not aware of?
…On Sat, Dec 29, 2018 at 10:56 AM Sandeep Krishnamurthy < ***@***.***> wrote:
***@***.**** commented on this pull request.
Thanks for your contributions. 2 questions.
1. Why should Hybridize even be an option? Why can't we just have it
as default?
2. export only is confusing or mis-leading. export is referred to a
model (network + params) not just network. And, why is this option required?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13244 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIiQ6h7cUg0YOocWN_KGkUfSHxXLuo1mks5u97rHgaJpZM4Ya48l>
.
|
|
*@sandeep-krishnamurthy*
If I understand correctly, perhaps I should also emphasize that there are
models that are never hybridized for good reasons. Hybridize should always
be “an option”, for two reasons:
1. For some algorithms, e.g., RNN models, hybridize offers no performance
differences.
2. Hybridize turns a gluon model into a symbol model and hence it strips
away all dynamic computation capabilities, such as if/else, for loop, and
array indexing. While mxnet 1.3 offers some dynamic graph capabilities,
they are still very limited. For example, if/else condition requires the
outputs to always have the same dimensions, which is sometimes impractical.
…On Sat, Dec 29, 2018 at 11:20 AM Yifei Ma ***@***.***> wrote:
1. As noted in both README and help strings, hybridizing an RNN is not
supported in mxnet<=1.2.
2. Export is the most obvious way for me to dump a network, unless you
recommend a different approach that I am not aware of?
On Sat, Dec 29, 2018 at 10:56 AM Sandeep Krishnamurthy <
***@***.***> wrote:
> ***@***.**** commented on this pull request.
>
> Thanks for your contributions. 2 questions.
>
> 1. Why should Hybridize even be an option? Why can't we just have it
> as default?
> 2. export only is confusing or mis-leading. export is referred to a
> model (network + params) not just network. And, why is this option required?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#13244 (review)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AIiQ6h7cUg0YOocWN_KGkUfSHxXLuo1mks5u97rHgaJpZM4Ya48l>
> .
>
|
Ok I agree.
On Sat, Dec 29, 2018 at 11:25 AM Sandeep Krishnamurthy <
[email protected]> wrote:
…
1. As noted in both README and help strings, hybridizing an RNN is not
supported in mxnet<=1.2. 2. Export is the most obvious way for me to dump a
network, unless you recommend a different approach that I am not aware of?
… <#m_-5660027600346315218_>
On Sat, Dec 29, 2018 at 10:56 AM Sandeep Krishnamurthy < ***@***.***>
wrote: ***@***.**** commented on this pull request. Thanks for your
contributions. 2 questions. 1. Why should Hybridize even be an option? Why
can't we just have it as default? 2. export only is confusing or
mis-leading. export is referred to a model (network + params) not just
network. And, why is this option required? — You are receiving this because
you were mentioned. Reply to this email directly, view it on GitHub <#13244
(review)
<#13244 (review)>>,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIiQ6h7cUg0YOocWN_KGkUfSHxXLuo1mks5u97rHgaJpZM4Ya48l
.
1. Yes, that makes sense. Thanks.
2. Export is fine. What I meant is 'export_only' does not convey that
only network is exported.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13244 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIiQ6gakEaMe6qR1giiiMTDi0ZVwA_qXks5u98GOgaJpZM4Ya48l>
.
|
Can you make the changes? Thanks!
…On Sat, Dec 29, 2018 at 11:35 AM Yifei Ma ***@***.***> wrote:
Ok I agree.
On Sat, Dec 29, 2018 at 11:25 AM Sandeep Krishnamurthy <
***@***.***> wrote:
>
> 1. As noted in both README and help strings, hybridizing an RNN is
> not supported in mxnet<=1.2. 2. Export is the most obvious way for me to
> dump a network, unless you recommend a different approach that I am not
> aware of?
> … <#m_2218069160341530556_m_-5660027600346315218_>
> On Sat, Dec 29, 2018 at 10:56 AM Sandeep Krishnamurthy < ***@***.***>
> wrote: ***@***.**** commented on this pull request. Thanks for your
> contributions. 2 questions. 1. Why should Hybridize even be an option? Why
> can't we just have it as default? 2. export only is confusing or
> mis-leading. export is referred to a model (network + params) not just
> network. And, why is this option required? — You are receiving this because
> you were mentioned. Reply to this email directly, view it on GitHub <#13244
> (review)
> <#13244 (review)>>,
> or mute the thread
> https://github.com/notifications/unsubscribe-auth/AIiQ6h7cUg0YOocWN_KGkUfSHxXLuo1mks5u97rHgaJpZM4Ya48l
> .
>
>
> 1. Yes, that makes sense. Thanks.
> 2. Export is fine. What I meant is 'export_only' does not convey that
> only network is exported.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#13244 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AIiQ6gakEaMe6qR1giiiMTDi0ZVwA_qXks5u98GOgaJpZM4Ya48l>
> .
>
|
@sandeep-krishnamurthy can you please review/merge this PR? |
@sandeep-krishnamurthy Thanks for the reviews so far. I agree with you but I am very confused what is exactly needed here. Please let me know how I can help. Thanks. |
@yifeim - Sorry for delayed response. Rest of changes LGTM. I was only concerned that "export_only" is not very intuitive word that gives the meaning of what that option does. |
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.
Thank you!
LGTM
* hybridize rnn and add model graph * trigger CI * separate mxboard visualization * add options and she-bang * add defaults * trigger CI * rename export-model
* hybridize rnn and add model graph * trigger CI * separate mxboard visualization * add options and she-bang * add defaults * trigger CI * rename export-model
* hybridize rnn and add model graph * trigger CI * separate mxboard visualization * add options and she-bang * add defaults * trigger CI * rename export-model
Description
Add hybridize option and visualize the network in mxnet>=1.3.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments