Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[TUTORIAL] Revise Naming tutorial #15365

Merged
merged 3 commits into from
Jul 5, 2019

Conversation

Ishitori
Copy link
Contributor

Description

Update the text of Naming tutorials to make it more readable. Plus adding conclusion and next step sections.

@Ishitori Ishitori requested a review from szha as a code owner June 25, 2019 23:33
Copy link
Contributor

@thomelane thomelane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks again @Ishitori. Can you keep the outputs for now? Current build process doesn't add them in.


The same principle applies to container blocks like [`Sequential`](https://mxnet.incubator.apache.org/versions/master/api/python/gluon/gluon.html#mxnet.gluon.nn.Sequential). `name_scope` can be used inside as well as outside of `__init__`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same principle applies -> The same principle applies


The same principle applies to container blocks like [`Sequential`](https://mxnet.incubator.apache.org/versions/master/api/python/gluon/gluon.html#mxnet.gluon.nn.Sequential). `name_scope` can be used inside as well as outside of `__init__`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can tell whether you're saying this is recommended or not? Using name scope with Sequential?

Parameter model1_mydense_bias (shape=(20,), dtype=<type 'numpy.float32'>)
)


As a result, if you try to save parameters from model0 and load it with model1, you'll get an error due to unmatching names:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"load it with model1"? Might want to rephrase this.


- In Gluon model zoo, all image classification models follow the format where the feature extraction layers are named `features` while the output layer is named `output`.
- Note that the output layer is a dense block with 1000 dimension outputs.
Sometimes you may want to load a pretrained model, and replace certain Blocks in it for fine-tuning. For example, the [`AlexNet`](https://mxnet.incubator.apache.org/versions/master/api/python/gluon/model_zoo.html#vision) model in the model zoo has 1000 output dimensions, but maybe you have only 100 classes in your application. Let's see how to change the number of output dimensions from 1000 to 100.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would mention that you can just set classes argument for this case. Guess you're doing like this for demonstration purposes.

@thomelane
Copy link
Contributor

Great, thanks for updates. LGTM.

@anirudhacharya
Copy link
Member

@mxnet-label-bot add [pr-awaiting-review]

@marcoabreu marcoabreu added the pr-awaiting-review PR is waiting for code review label Jun 28, 2019
@ThomasDelteil ThomasDelteil merged commit 74dbadb into apache:master Jul 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants