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

[MXNET-1335][fit api]Text Sentiment Classification examples using Gluon fit() API #14350

Closed
wants to merge 3 commits into from

Conversation

karan6181
Copy link
Contributor

Description

This PR adds Text Sentiment Classification examples using Gluon fit() API. This PR depends on its parent PR(14346).

JIRA epic can be found here: https://issues.apache.org/jira/projects/MXNET/issues/MXNET-1335

The examples has been modified from D2L Gluon book. This examples shows that the fit() API helps in reducing the training script by approx. 25 lines, and also the target users doesn't need to write their own training loop.

Note: We have covered some of the models, more to be added soon.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with MXNET-1335
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Feature1, tests, (and when applicable, API doc)
  • Feature2, tests, (and when applicable, API doc)

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

Copy link
Member

@szha szha left a comment

Choose a reason for hiding this comment

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

Most of the code doesn't seem necessary for show casing the fit API. A carefully written tutorial seems more useful. Would you like to give it a try?

@vandanavk
Copy link
Contributor

@mxnet-label-bot add [Gluon, pr-work-in-progress]

@marcoabreu marcoabreu added Gluon pr-work-in-progress PR is still work in progress labels Mar 7, 2019
@nswamy
Copy link
Member

nswamy commented Mar 8, 2019

I think it might be a good idea to have these example(for Gluon) in the main repo, while i understand(and agree for Image classification) we don't want to replicate code from one repo to another, it could useful for people who come to mxnet directly.

Alternatively, these can be moved under integration tests.

@karan6181 Also, can you try reusing gluon-nlp constructs

@roywei
Copy link
Member

roywei commented Mar 8, 2019

Hi @szha, thanks for pointing out, we do plan to do a tutorial for the API. after some discussions, we dediced to move these examples to integration tests first. We will import what's available in vision model zoo, but will create these models again for RNN use cases.
Please see out updated test plan here. two tests for training accuracy and two teststo run all modesl (one forward and backward)

@karan6181
Copy link
Contributor Author

Hi @szha , thank you for your inputs. we were planning to shift these examples into an integration test with some modifications(less redundant code). Would it be a good idea to use gluon-NLP toolkit API here? or constructing/preprocessing a dataset from scratch seems more appropriate?

@szha
Copy link
Member

szha commented Mar 9, 2019

@karan6181 for examples you can use any dependency, license permitting.

@nswamy nswamy changed the title [MXNET-1335][WIP][fit api]Text Sentiment Classification examples using Gluon fit() API [MXNET-1335][fit api]Text Sentiment Classification examples using Gluon fit() API Mar 19, 2019
@nswamy
Copy link
Member

nswamy commented Apr 5, 2019

closing in lieu of #14547

@nswamy nswamy closed this Apr 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Gluon pr-work-in-progress PR is still work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants