A Classification Example in Forte Pipeline using CNN Classifier and Bert Classifier#336
Open
ziqian98 wants to merge 57 commits intoasyml:masterfrom
ziqian98:lzq_new_classification
Open
A Classification Example in Forte Pipeline using CNN Classifier and Bert Classifier#336ziqian98 wants to merge 57 commits intoasyml:masterfrom ziqian98:lzq_new_classification
ziqian98 wants to merge 57 commits intoasyml:masterfrom
ziqian98:lzq_new_classification
Conversation
Collaborator
Author
|
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:
|
hunterhector
requested changes
Dec 17, 2020
Member
hunterhector
left a comment
There was a problem hiding this comment.
- 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
jasonyanwenl
suggested changes
Dec 22, 2020
Collaborator
jasonyanwenl
left a comment
There was a problem hiding this comment.
Overall, you missed the type hint for many variables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.