You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-9Lines changed: 6 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,8 @@
1
-
## Note: This repo is currently being updated for the new TorchText API!
2
-
3
-
**From August 2020 onwards, the new TorchText API from TorchText >=0.7 should be used. This requires PyTorch >=1.6. The implementations below will not be updated in order to provide legacy support. Instead, new tutorials that make use the new API are being written. These are located in the [experimental](https://github.com/bentrevett/pytorch-sentiment-analysis/tree/master/experimental) folder and are currently in progress. They require TorchText 0.8 >= which, as of September 2020, must be built from the master branch of TorchText.**
4
-
5
-
**If you have any feedback in regards to them, please submit and issue with the word "experimental" somewhere in the title.**
6
-
7
1
# PyTorch Sentiment Analysis
8
2
9
-
This repo contains tutorials covering how to do sentiment analysis using [PyTorch](https://github.com/pytorch/pytorch) 1.3 and [TorchText](https://github.com/pytorch/text) 0.4 using Python 3.7.
3
+
## Note: This repo only works with torchtext 0.9 or above which requires PyTorch 1.8 or above. If you are using torchtext 0.8 then please use [this](https://github.com/bentrevett/pytorch-sentiment-analysis/tree/torchtext08) branch.
4
+
5
+
This repo contains tutorials covering how to do sentiment analysis using [PyTorch](https://github.com/pytorch/pytorch) 1.8 and [torchtext](https://github.com/pytorch/text) 0.9 using Python 3.7.
10
6
11
7
The first 2 tutorials will cover getting started with the de facto approach to sentiment analysis: recurrent neural networks (RNNs). The third notebook covers the [FastText](https://arxiv.org/abs/1607.01759) model and the final covers a [convolutional neural network](https://arxiv.org/abs/1408.5882) (CNN) model.
12
8
@@ -35,7 +31,8 @@ For tutorial 6, we'll use the transformers library, which can be installed via:
35
31
```bash
36
32
pip install transformers
37
33
```
38
-
These tutorials were created using version 1.2 of the transformers library.
34
+
35
+
These tutorials were created using version 4.3 of the transformers library.
39
36
40
37
## Tutorials
41
38
@@ -56,7 +53,7 @@ These tutorials were created using version 1.2 of the transformers library.
56
53
Next, we'll cover convolutional neural networks (CNNs) for sentiment analysis. This model will be an implementation of [Convolutional Neural Networks for Sentence Classification](https://arxiv.org/abs/1408.5882).
57
54
58
55
* 5 - [Multi-class Sentiment Analysis](https://github.com/bentrevett/pytorch-sentiment-analysis/blob/master/5%20-%20Multi-class%20Sentiment%20Analysis.ipynb)[](https://colab.research.google.com/github/bentrevett/pytorch-sentiment-analysis/blob/master/5%20-%20Multi-class%20Sentiment%20Analysis.ipynb)
59
-
56
+
60
57
Then we'll cover the case where we have more than 2 classes, as is common in NLP. We'll be using the CNN model from the previous notebook and a new dataset which has 6 classes.
61
58
62
59
* 6 - [Transformers for Sentiment Analysis](https://github.com/bentrevett/pytorch-sentiment-analysis/blob/master/6%20-%20Transformers%20for%20Sentiment%20Analysis.ipynb)[](https://colab.research.google.com/github/bentrevett/pytorch-sentiment-analysis/blob/master/6%20-%20Transformers%20for%20Sentiment%20Analysis.ipynb)
0 commit comments