-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0777f70
commit 01a1ac4
Showing
8 changed files
with
626 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.ipynb_checkpoints | ||
|
||
|
||
__pycache__/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
# multi-label-sentiment-classifier | ||
How to build a multi-label sentiment classifiers with Tez and PyTorch | ||
### Training a Multi-Label Emotion Classifier with Tez and PyTorch | ||
|
||
If you're tired of rewriting the same boilerplate code of your training pipelines in PyTorch, I've found a pretty neat solution that could make your life easier. Don't worry, it's not a heavy library that'll change your way of doing things. | ||
|
||
It's rather a lightweight wrapper that encapsulates your training logic in a single class. It's built on top of PyTorch, it's quite recent but I've tested it and I think it does what it promises so far. | ||
|
||
It's called Tez and we'll see it today in action on a fun multi-label text classification problem. Let's jump right in. | ||
|
||
 |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
_CLASS_NAMES = [ | ||
"admiration", | ||
"amusement", | ||
"anger", | ||
"annoyance", | ||
"approval", | ||
"caring", | ||
"confusion", | ||
"curiosity", | ||
"desire", | ||
"disappointment", | ||
"disapproval", | ||
"disgust", | ||
"embarrassment", | ||
"excitement", | ||
"fear", | ||
"gratitude", | ||
"grief", | ||
"joy", | ||
"love", | ||
"nervousness", | ||
"optimism", | ||
"pride", | ||
"realization", | ||
"relief", | ||
"remorse", | ||
"sadness", | ||
"surprise", | ||
"neutral", | ||
] | ||
|
||
mapping = dict(zip(range(len(_CLASS_NAMES)),_CLASS_NAMES)) |
Empty file.
Oops, something went wrong.