-
Notifications
You must be signed in to change notification settings - Fork 60
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
A Classification Example in Forte Pipeline using CNN Classifier and Bert Classifier #336
base: master
Are you sure you want to change the base?
Conversation
For the classification task using Conv_classifier:
For the classification task using Bert_classifier:
For the classification task using Conv_classifier and merging the data_augmentation feature:
|
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.
- You will need a readme to tell people what is this example and how to use this.
- Please add models to download and evaluation results, please include these in the readme.
- Please clean out your code, if you commented out lines, remove them. If you have functions that you reuse, create a utility.
- Don't randomly print stuff, it will pollute the user's terminal. If you really want to show something, use logging, where users can suppress.
- Don't call your folder
Classification_new
. - The whole train cnn and train bert are just dupcliates of each other. Please don't repeat yourself, just make an example that work for both. Same apply for the test file.
- The same for the data augmentation variant and the normal variant, why are you copying everything?
- You are using the augmentation processors wrong. Why are you copying the reader implementation again?
examples/Classification_new/main_train_cnn_data_augmentation.py
Outdated
Show resolved
Hide resolved
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.
Overall, you missed the type hint for many variables.
This PR fixes [https://github.com//issues/328].
Description of changes
Provide Forte with a classification example using CNN
Provide Forte with a classification example using CNN
Merge the data augmentation features in Reader currently
Possible influences of this PR.
For the Conv classifier:
https://github.com/asyml/texar-pytorch/blob/master/texar/torch/modules/classifiers/conv_classifiers.py
For the Bert classifier:
https://github.com/asyml/texar-pytorch/blob/master/texar/torch/modules/classifiers/bert_classifier.py
Test Conducted
Describe what test cases are included for the PR.
CNN version can train and predict correctly locally.
Bert version can train and predict correctly locally.
CNN version with data augmentation can train and predict correctly locally.