Pytorch implementation of "Attention-Based Recurrent Neural Network Models for Joint Intent Detection and Slot Filling"

Overview

RNN-for-Joint-NLU

Pytorch implementation of "Attention-Based Recurrent Neural Network Models for Joint Intent Detection and Slot Filling" (https://arxiv.org/pdf/1609.01454.pdf)

Intent prediction and slot filling are performed in two branches based on Encoder-Decoder model.

dataset (Atis)

You can get data from here

Requirements

  • Pytorch 0.2

Train

python3 train.py --data_path 'your data path e.g. ./data/atis-2.train.w-intent.iob'

Result

You might also like...
A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch

This repository holds NVIDIA-maintained utilities to streamline mixed precision and distributed training in Pytorch. Some of the code here will be included in upstream Pytorch eventually. The intention of Apex is to make up-to-date utilities available to users as quickly as possible.

Objective of the repository is to learn and build machine learning models using Pytorch. 30DaysofML Using Pytorch
Objective of the repository is to learn and build machine learning models using Pytorch. 30DaysofML Using Pytorch

30 Days Of Machine Learning Using Pytorch Objective of the repository is to learn and build machine learning models using Pytorch. List of Algorithms

Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch
Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Amazon Forest Computer Vision: Satellite Image tagging code using PyTorch / Keras with lots of PyTorch tricks
Amazon Forest Computer Vision: Satellite Image tagging code using PyTorch / Keras with lots of PyTorch tricks

Amazon Forest Computer Vision Satellite Image tagging code using PyTorch / Keras Here is a sample of images we had to work with Source: https://www.ka

The Incredible PyTorch: a curated list of tutorials, papers, projects, communities and more relating to PyTorch.
The Incredible PyTorch: a curated list of tutorials, papers, projects, communities and more relating to PyTorch.

This is a curated list of tutorials, projects, libraries, videos, papers, books and anything related to the incredible PyTorch. Feel free to make a pu

Amazon Forest Computer Vision: Satellite Image tagging code using PyTorch / Keras with lots of PyTorch tricks
Amazon Forest Computer Vision: Satellite Image tagging code using PyTorch / Keras with lots of PyTorch tricks

Amazon Forest Computer Vision Satellite Image tagging code using PyTorch / Keras Here is a sample of images we had to work with Source: https://www.ka

A bunch of random PyTorch models using PyTorch's C++ frontend
A bunch of random PyTorch models using PyTorch's C++ frontend

PyTorch Deep Learning Models using the C++ frontend Gettting started Clone the repo 1. https://github.com/mrdvince/pytorchcpp 2. cd fashionmnist or

PyTorch Autoencoders - Implementing a Variational Autoencoder (VAE) Series in Pytorch.

PyTorch Autoencoders Implementing a Variational Autoencoder (VAE) Series in Pytorch. Inspired by this repository Model List check model paper conferen

PyTorch-LIT is the Lite Inference Toolkit (LIT) for PyTorch which focuses on easy and fast inference of large models on end-devices.

PyTorch-LIT PyTorch-LIT is the Lite Inference Toolkit (LIT) for PyTorch which focuses on easy and fast inference of large models on end-devices. With

Comments
  • code question in train.py

    code question in train.py

    Hi,thank you for implementing the code for that paper. But I encountered a problem while

     tag_score, intent_score = decoder(start_decode,hidden_c,output,x_mask)
    
    > Traceback (most recent call last):
      File "E:/NER/RNN-for-Joint-NLU-master/train.py", line 102, in <module>
        train(config)
      File "E:/NER/RNN-for-Joint-NLU-master/train.py", line 54, in train
        tag_score, intent_score = decoder(start_decode,hidden_c,output,x_mask)
      File "D:\anaconda3\lib\site-packages\torch\nn\modules\module.py", line 489, in __call__
        result = self.forward(*input, **kwargs)
      File "E:\NER\RNN-for-Joint-NLU-master\model.py", line 120, in forward
        _, hidden = self.lstm(torch.cat((embedded,context,aligned),2), hidden) # input, context, aligned encoder hidden, hidden
      File "D:\anaconda3\lib\site-packages\torch\nn\modules\module.py", line 489, in __call__
        result = self.forward(*input, **kwargs)
      File "D:\anaconda3\lib\site-packages\torch\nn\modules\rnn.py", line 175, in forward
        self.check_forward_args(input, hx, batch_sizes)
      File "D:\anaconda3\lib\site-packages\torch\nn\modules\rnn.py", line 152, in check_forward_args
        'Expected hidden[0] size {}, got {}')
      File "D:\anaconda3\lib\site-packages\torch\nn\modules\rnn.py", line 148, in check_hidden_size
        raise RuntimeError(msg.format(expected_hidden_size, tuple(hx.size())))
    RuntimeError: Expected hidden[0] size (1, 16, 128), got (2, 16, 128)
    
    opened by AMANKB 2
  • There aren't models documents that contains the jointnlu-encoder.pkl and jointnlu-decoder.pkl model

    There aren't models documents that contains the jointnlu-encoder.pkl and jointnlu-decoder.pkl model

    FileNotFoundError: [Errno 2] No such file or directory: 'models/jointnlu-encoder.pkl'**** FileNotFoundError: [Errno 2] No such file or directory: 'models/jointnlu-decoder.pkl'****

    There aren't models documents that contains the jointnlu-encoder.pkl and jointnlu-decoder.pkl model, could you give me a solution?

    opened by AlexNLP 0
  • Could not set num_layers > 1 for LSTM

    Could not set num_layers > 1 for LSTM

    since in the code we suppose the hidden layer's shape is [1, B, D], if we set num_layers > 1 for LSTM whose hidden layer's shape will be [>1, B, D] so that some continued operation could not be executed successfully.

    opened by rouseway 0
  • Intent score

    Intent score

    Thank you for open sourcing your code. I couldn't reach the intent perfomance mentioned in the paper. Can you tell what is a performance that you getting?

    Thanks in advance.

    opened by hardik2396 1
Owner
Kim SungDong
Naver AI LAB Researcher Interested in NLP / Representation Learning / Reinforcement Learning
Kim SungDong
An essential implementation of BYOL in PyTorch + PyTorch Lightning

Essential BYOL A simple and complete implementation of Bootstrap your own latent: A new approach to self-supervised Learning in PyTorch + PyTorch Ligh

Enrico Fini 48 Sep 27, 2022
RealFormer-Pytorch Implementation of RealFormer using pytorch

RealFormer-Pytorch Implementation of RealFormer using pytorch. Includes comparison with classical Transformer on image classification task (ViT) wrt C

Simo Ryu 90 Dec 8, 2022
A PyTorch implementation of the paper Mixup: Beyond Empirical Risk Minimization in PyTorch

Mixup: Beyond Empirical Risk Minimization in PyTorch This is an unofficial PyTorch implementation of mixup: Beyond Empirical Risk Minimization. The co

Harry Yang 121 Dec 17, 2022
A pytorch implementation of Pytorch-Sketch-RNN

Pytorch-Sketch-RNN A pytorch implementation of https://arxiv.org/abs/1704.03477 In order to draw other things than cats, you will find more drawing da

Alexis David Jacq 172 Dec 12, 2022
PyTorch implementation of Advantage async actor-critic Algorithms (A3C) in PyTorch

Advantage async actor-critic Algorithms (A3C) in PyTorch @inproceedings{mnih2016asynchronous, title={Asynchronous methods for deep reinforcement lea

LEI TAI 111 Dec 8, 2022
Pytorch-diffusion - A basic PyTorch implementation of 'Denoising Diffusion Probabilistic Models'

PyTorch implementation of 'Denoising Diffusion Probabilistic Models' This reposi

Arthur Juliani 76 Jan 7, 2023
Fang Zhonghao 13 Nov 19, 2022
RETRO-pytorch - Implementation of RETRO, Deepmind's Retrieval based Attention net, in Pytorch

RETRO - Pytorch (wip) Implementation of RETRO, Deepmind's Retrieval based Attent

Phil Wang 556 Jan 4, 2023
HashNeRF-pytorch - Pure PyTorch Implementation of NVIDIA paper on Instant Training of Neural Graphics primitives

HashNeRF-pytorch Instant-NGP recently introduced a Multi-resolution Hash Encodin

Yash Sanjay Bhalgat 616 Jan 6, 2023
Generic template to bootstrap your PyTorch project with PyTorch Lightning, Hydra, W&B, and DVC.

NN Template Generic template to bootstrap your PyTorch project. Click on Use this Template and avoid writing boilerplate code for: PyTorch Lightning,

Luca Moschella 520 Dec 30, 2022