All Projects → rguthrie3 → Deeplearningfornlpinpytorch

rguthrie3 / Deeplearningfornlpinpytorch

Licence: mit
An IPython Notebook tutorial on deep learning for natural language processing, including structure prediction.

Programming Languages

Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to Deeplearningfornlpinpytorch

Thesemicolon
This repository contains Ipython notebooks and datasets for the data analytics youtube tutorials on The Semicolon.
Stars: ✭ 345 (-80.22%)
Mutual labels:  jupyter-notebook, tutorial, lstm
Pytorch Sentiment Analysis
Tutorials on getting started with PyTorch and TorchText for sentiment analysis.
Stars: ✭ 3,209 (+84%)
Mutual labels:  jupyter-notebook, tutorial, lstm
End To End Sequence Labeling Via Bi Directional Lstm Cnns Crf Tutorial
Tutorial for End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF
Stars: ✭ 87 (-95.01%)
Mutual labels:  jupyter-notebook, tutorial, lstm
Pytorch Seq2seq
Tutorials on implementing a few sequence-to-sequence (seq2seq) models with PyTorch and TorchText.
Stars: ✭ 3,418 (+95.99%)
Mutual labels:  jupyter-notebook, tutorial, lstm
Getting Things Done With Pytorch
Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch. Topics: Face detection with Detectron 2, Time Series anomaly detection with LSTM Autoencoders, Object Detection with YOLO v5, Build your first Neural Network, Time Series forecasting for Coronavirus daily cases, Sentiment Analysis with BERT.
Stars: ✭ 738 (-57.68%)
Mutual labels:  jupyter-notebook, tutorial, lstm
Machine Learning
My Attempt(s) In The World Of ML/DL....
Stars: ✭ 78 (-95.53%)
Mutual labels:  jupyter-notebook, tutorial, lstm
Pytorch Pos Tagging
A tutorial on how to implement models for part-of-speech tagging using PyTorch and TorchText.
Stars: ✭ 96 (-94.5%)
Mutual labels:  jupyter-notebook, tutorial, lstm
Mlf Mlt
📚 机器学习基石和机器学习技法作业
Stars: ✭ 112 (-93.58%)
Mutual labels:  jupyter-notebook, tutorial
Cadl
ARCHIVED: Contains historical course materials/Homework materials for the FREE MOOC course on "Creative Applications of Deep Learning w/ Tensorflow" #CADL
Stars: ✭ 1,478 (-15.25%)
Mutual labels:  jupyter-notebook, tutorial
Vae Tensorflow
A Tensorflow implementation of a Variational Autoencoder for the deep learning course at the University of Southern California (USC).
Stars: ✭ 117 (-93.29%)
Mutual labels:  jupyter-notebook, tutorial
Linear Attention Recurrent Neural Network
A recurrent attention module consisting of an LSTM cell which can query its own past cell states by the means of windowed multi-head attention. The formulas are derived from the BN-LSTM and the Transformer Network. The LARNN cell with attention can be easily used inside a loop on the cell state, just like any other RNN. (LARNN)
Stars: ✭ 119 (-93.18%)
Mutual labels:  jupyter-notebook, lstm
Lstm Gru Pytorch
LSTM and GRU in PyTorch
Stars: ✭ 109 (-93.75%)
Mutual labels:  jupyter-notebook, lstm
Deeplearning tutorials
The deeplearning algorithms implemented by tensorflow
Stars: ✭ 1,580 (-9.4%)
Mutual labels:  jupyter-notebook, lstm
Nlp Models Tensorflow
Gathers machine learning and Tensorflow deep learning models for NLP problems, 1.13 < Tensorflow < 2.0
Stars: ✭ 1,603 (-8.08%)
Mutual labels:  jupyter-notebook, lstm
Deep Learning Based Ecg Annotator
Annotation of ECG signals using deep learning, tensorflow’ Keras
Stars: ✭ 110 (-93.69%)
Mutual labels:  tutorial, lstm
Qiskit Tutorials
A collection of Jupyter notebooks showing how to use the Qiskit SDK
Stars: ✭ 1,777 (+1.89%)
Mutual labels:  jupyter-notebook, tutorial
Learning Vis Tools
Learning Vis Tools: Tutorial materials for Data Visualization course at HKUST
Stars: ✭ 108 (-93.81%)
Mutual labels:  jupyter-notebook, tutorial
Reinforcementlearning Atarigame
Pytorch LSTM RNN for reinforcement learning to play Atari games from OpenAI Universe. We also use Google Deep Mind's Asynchronous Advantage Actor-Critic (A3C) Algorithm. This is much superior and efficient than DQN and obsoletes it. Can play on many games
Stars: ✭ 118 (-93.23%)
Mutual labels:  jupyter-notebook, lstm
Pandas Videos
Jupyter notebook and datasets from the pandas Q&A video series
Stars: ✭ 1,716 (-1.61%)
Mutual labels:  jupyter-notebook, tutorial
Chinese Chatbot
中文聊天机器人,基于10万组对白训练而成,采用注意力机制,对一般问题都会生成一个有意义的答复。已上传模型,可直接运行,跑不起来直播吃键盘。
Stars: ✭ 124 (-92.89%)
Mutual labels:  jupyter-notebook, lstm

Table of Contents:

  1. Introduction to Torch's Tensor Library
  2. Computation Graphs and Automatic Differentiation
  3. Deep Learning Building Blocks: Affine maps, non-linearities, and objectives
  4. Optimization and Training
  5. Creating Network Components in Pytorch
  • Example: Logistic Regression Bag-of-Words text classifier
  1. Word Embeddings: Encoding Lexical Semantics
  • Example: N-Gram Language Modeling
  • Exercise: Continuous Bag-of-Words for learning word embeddings
  1. Sequence modeling and Long-Short Term Memory Networks
  • Example: An LSTM for Part-of-Speech Tagging
  • Exercise: Augmenting the LSTM tagger with character-level features
  1. Advanced: Dynamic Toolkits, Dynamic Programming, and the BiLSTM-CRF
  • Example: Bi-LSTM Conditional Random Field for named-entity recognition
  • Exercise: A new loss function for discriminative tagging

What is this tutorial?

I am writing this tutorial because, although there are plenty of other tutorials out there, they all seem to have one of three problems:

  • They have a lot of content on computer vision and conv nets, which is irrelevant for most NLP (although conv nets have been applied in cool ways to NLP problems).
  • Pytorch is brand new, and so many deep learning for NLP tutorials are in older frameworks, and usually not in dynamic frameworks like Pytorch, which have a totally different flavor.
  • The examples don't move beyond RNN language models and show the awesome stuff you can do when trying to do lingusitic structure prediction. I think this is a problem, because Pytorch's dynamic graphs make structure prediction one of its biggest strengths.

Specifically, I am writing this tutorial for a Natural Language Processing class at Georgia Tech, to ease into a problem set I wrote for the class on deep transition parsing. The problem set uses some advanced techniques. The intention of this tutorial is to cover the basics, so that students can focus on the more challenging aspects of the problem set. The aim is to start with the basics and move up to linguistic structure prediction, which I feel is almost completely absent in other Pytorch tutorials. The general deep learning basics have short expositions. Topics more NLP-specific received more in-depth discussions, although I have referred to other sources when I felt a full description would be reinventing the wheel and take up too much space.

Dependency Parsing Problem Set

As mentioned above, here is the problem set that goes through implementing a high-performing dependency parser in Pytorch. I wanted to add a link here since it might be useful, provided you ignore the things that were specific to the class. A few notes:

  • There is a lot of code, so the beginning of the problem set was mainly to get people familiar with the way my code represented the relevant data, and the interfaces you need to use. The rest of the problem set is actually implementing components for the parser. Since we hadn't done deep learning in the class before, I tried to provide an enormous amount of comments and hints when writing it.
  • There is a unit test for every deliverable, which you can run with nosetests.
  • Since we use this problem set in the class, please don't publically post solutions.
  • The same repo has some notes that include a section on shift-reduce dependency parsing, if you are looking for a written source to complement the problem set.
  • The link above might not work if it is taken down at the start of a new semester.

References:

  • I learned a lot about deep structure prediction at EMNLP 2016 from this tutorial on Dynet, given by Chris Dyer and Graham Neubig of CMU and Yoav Goldberg of Bar Ilan University. Dynet is a great package, especially if you want to use C++ and avoid dynamic typing. The final BiLSTM CRF exercise and the character-level features exercise are things I learned from this tutorial.
  • A great book on structure prediction is Linguistic Structure Prediction by Noah Smith. It doesn't use deep learning, but that is ok.
  • The best deep learning book I am aware of is Deep Learning, which is by some major contributors to the field and very comprehensive, although there is not an NLP focus. It is free online, but worth having on your shelf.

Exercises:

There are a few exercises in the tutorial, which are either to implement a popular model (CBOW) or augment one of my models. The character-level features exercise especially is very non-trivial, but very useful (I can't quote the exact numbers, but I have run the experiment before and usually the character-level features increase accuracy 2-3%). Since they aren't simple exercises, I will soon implement them myself and add them to the repo.

Suggestions:

Please open a GitHub issue if you find any mistakes or think there is a particular model that would be useful to add.

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].