All Projects → dmesquita → Easy Deep Learning With Allennlp

dmesquita / Easy Deep Learning With Allennlp

🔮Deep Learning for text made easy with AllenNLP

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Easy Deep Learning With Allennlp

Nlp Pretrained Model
A collection of Natural language processing pre-trained models.
Stars: ✭ 122 (+281.25%)
Mutual labels:  natural-language-processing, deep-neural-networks, neural-networks, text-classification
Bidaf Keras
Bidirectional Attention Flow for Machine Comprehension implemented in Keras 2
Stars: ✭ 60 (+87.5%)
Mutual labels:  natural-language-processing, deep-neural-networks, neural-networks
Deep Math Machine Learning.ai
A blog which talks about machine learning, deep learning algorithms and the Math. and Machine learning algorithms written from scratch.
Stars: ✭ 173 (+440.63%)
Mutual labels:  natural-language-processing, deep-neural-networks, neural-networks
Awesome Distributed Deep Learning
A curated list of awesome Distributed Deep Learning resources.
Stars: ✭ 277 (+765.63%)
Mutual labels:  natural-language-processing, deep-neural-networks, neural-networks
Pytorchnlpbook
Code and data accompanying Natural Language Processing with PyTorch published by O'Reilly Media https://nlproc.info
Stars: ✭ 1,390 (+4243.75%)
Mutual labels:  natural-language-processing, deep-neural-networks, neural-networks
Spacy
💫 Industrial-strength Natural Language Processing (NLP) in Python
Stars: ✭ 21,978 (+68581.25%)
Mutual labels:  natural-language-processing, neural-networks, text-classification
Tez
Tez is a super-simple and lightweight Trainer for PyTorch. It also comes with many utils that you can use to tackle over 90% of deep learning projects in PyTorch.
Stars: ✭ 580 (+1712.5%)
Mutual labels:  deep-neural-networks, neural-networks
Speech Emotion Analyzer
The neural network model is capable of detecting five different male/female emotions from audio speeches. (Deep Learning, NLP, Python)
Stars: ✭ 633 (+1878.13%)
Mutual labels:  natural-language-processing, deep-neural-networks
Nlp Recipes
Natural Language Processing Best Practices & Examples
Stars: ✭ 5,783 (+17971.88%)
Mutual labels:  natural-language-processing, text-classification
Keras Attention
Visualizing RNNs using the attention mechanism
Stars: ✭ 697 (+2078.13%)
Mutual labels:  natural-language-processing, deep-neural-networks
Ner Lstm
Named Entity Recognition using multilayered bidirectional LSTM
Stars: ✭ 532 (+1562.5%)
Mutual labels:  natural-language-processing, deep-neural-networks
Wikipedia2vec
A tool for learning vector representations of words and entities from Wikipedia
Stars: ✭ 655 (+1946.88%)
Mutual labels:  natural-language-processing, text-classification
Machine Learning
머신러닝 입문자 혹은 스터디를 준비하시는 분들에게 도움이 되고자 만든 repository입니다. (This repository is intented for helping whom are interested in machine learning study)
Stars: ✭ 705 (+2103.13%)
Mutual labels:  natural-language-processing, neural-networks
Awesome Bert Nlp
A curated list of NLP resources focused on BERT, attention mechanism, Transformer networks, and transfer learning.
Stars: ✭ 567 (+1671.88%)
Mutual labels:  natural-language-processing, neural-networks
Pythoncode Tutorials
The Python Code Tutorials
Stars: ✭ 544 (+1600%)
Mutual labels:  natural-language-processing, text-classification
Deep Learning Guide
An evolving guide to learning Deep Learning effectively.
Stars: ✭ 642 (+1906.25%)
Mutual labels:  natural-language-processing, neural-networks
Hanlp
中文分词 词性标注 命名实体识别 依存句法分析 成分句法分析 语义依存分析 语义角色标注 指代消解 风格转换 语义相似度 新词发现 关键词短语提取 自动摘要 文本分类聚类 拼音简繁转换 自然语言处理
Stars: ✭ 24,626 (+76856.25%)
Mutual labels:  natural-language-processing, text-classification
Deepfacelab
DeepFaceLab is the leading software for creating deepfakes.
Stars: ✭ 30,308 (+94612.5%)
Mutual labels:  deep-neural-networks, neural-networks
Kur
Descriptive Deep Learning
Stars: ✭ 811 (+2434.38%)
Mutual labels:  deep-neural-networks, neural-networks
Quickdraw
Implementation of Quickdraw - an online game developed by Google
Stars: ✭ 805 (+2415.63%)
Mutual labels:  deep-neural-networks, neural-networks

Training a deep learning model with AllenNLP

In this tutorial we’ll use the 20 newsgroups provided by scikit-learn. For more details check out this article 😉

With AllenNLP we define the model architecture in a JSON file (experiments/newsgroups_without_cuda.json). This Model performs text classification for the newsgroup files. The basic model structure: we'll embed the text and encode it with a Seq2VecEncoder. We'll then pass the result through a feedforward network, the output of which we'll use as our scores for each label.

1 —Data inputs

To set the input dataset and how to read from it we use the 'dataset_reader' key in the JSON file. We specify how to read the data here by creating a DatasetReader class

2 — The model

To specify the model we’ll set the 'model' key. There are three more parameters inside: 'model_text_field_embedder', 'internal_text_encoder' and 'classifier_feedforward'. The internals of the model is defined in the Fetch20NewsgroupsClassifier class

3 — The data iterator

AllenNLP provides an iterator called BucketIterator that makes the computations (padding) more efficient by padding batches with respect to the maximum input lengths per batch. To do that it sorts the instances by the number of tokens in each text. We set these parameters in the 'iterator' key of the JSON file.

4 — Training the model

The trainer uses the AdaGrad optimizer for 30 epochs, stopping if validation accuracy has not increased for the last 3 epochs. This is also specified in the JSON file.

To train the model locally we need to run this:

python3 run.py train experiments/newsgroups_without_cuda.json --include-package newsgroups.dataset_readers --include-package newsgroups.models

Train the model: colaboratory notebook

https://colab.research.google.com/drive/1q3b5HAkcjYsVd6yhrwnxL2ByqGK08jhQ

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].