Comments (4)
I'm working on this currently. Planning to completely re-do all of the tutorials -- change the order and models used -- now that the new API is stable.
from pytorch-sentiment-analysis.
Thanks a lot! Looking forward to it!
from pytorch-sentiment-analysis.
Tutorials with the new API are now available, see:
- https://github.com/bentrevett/pytorch-sentiment-analysis/blob/master/1_nbow.ipynb
- https://github.com/bentrevett/pytorch-sentiment-analysis/blob/master/2_lstm.ipynb
- https://github.com/bentrevett/pytorch-sentiment-analysis/blob/master/3_cnn.ipynb
- https://github.com/bentrevett/pytorch-sentiment-analysis/blob/master/4_transformer.ipynb
Only the code is available for now, need to add the text/images. Major changes are:
- using new torchtext API
- using HuggingFace Datasets to load data. I decided to use this instead of torchtext to load the data as the HuggingFace team are constantly adding new datasets pretty rapidly, whereas torchtext seems to be hesitant to add more.
- using tqdm instead of a custom timing function
- plotting the loss/acc per batch instead of just printing loss/acc per epoch
- order/models changed from rnn -> lstm -> nbow -> cnn -> transformer, to: nbow -> lstm -> cnn -> transformer. Decided it was better to start with the nbow model as it's the simplest, and nobody uses plain RNNs anymore and it was weird to start the tutorial with a model that didn't work.
- use FastText embeddings instead of GloVe. API is the same but I see more people use FastText so decided to switch.
from pytorch-sentiment-analysis.
Hie, is there a way to import custom data on the new torchtext API, as the data.TabularDatasets.splits is now retired.
Thanks.
from pytorch-sentiment-analysis.
Related Issues (20)
- The train_data built from my own dataset after following the Appendix A looks wrong HOT 1
- .squeeze(1) HOT 5
- for word embedding in RNN model HOT 2
- Representation of similar words HOT 1
- Using a target size (torch.Size([64, 1])) that is different to the input size (torch.Size([304800, 1])) is deprecated. Please ensure they have the same size HOT 7
- train_test_split in LSTM HOT 2
- pad sequence in my dataset
- 6 - Transformers for Sentiment Analysis HOT 1
- Question in fasttext HOT 1
- ModuleNotFoundError
- How can I predict on one example?
- User Interface
- Got error" 'lengths' argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor " HOT 10
- where is the trained model parameters ? HOT 1
- TypeError HOT 2
- Multi-class Sentiment Analysis: How to use custom dataset?
- how did you build torchtext from source HOT 4
- how does pytorch pad sentences ? HOT 3
- Pad Sequence error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-sentiment-analysis.