GithubHelp home page GithubHelp logo

kevinmunson / tpr-rnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ischlag/tpr-rnn

0.0 0.0 0.0 39 KB

Code for the publication Learning to Reason with Third-Order Tensor Products.

Python 99.51% Shell 0.49%

tpr-rnn's Introduction

Learning to Reason with Third-Order Tensor Products

This repository contains the code accompanying the paper Learning to Reason with Third-Order Tensor Products published at NeurIPS, 2018. It encompasses our implementation of the Tensor Product Representation Recurrent Neural Network (TPR-RNN) applied to the bAbI tasks with SOTA results. A download script for a pretrained model is provided.

Requirements

  • Python 3
  • Tensorflow==1.11.0
  • Seaborn==0.9.0
  • Sklearn==0.0

Make sure to upgrade pip before installing the requirements.

pip3 install -r requirements.txt
sh download_data_and_model.sh

Usage

Run the pre-trained model.

python3 evaluation.py

Train from scratch. (Look at the train.py files for details)

python3 train.py

Generate small hierarchically clustered similarity matrices of a random set of sentences using different internal representations and the cosine similarity.

python3 cluster_analysis.py

Results

With this code we achieved the following error (rounded to two decimal places) when trained on all bAbI tasks simultaneously. In the appendix of the paper we provide a breakdown per task.

task run-0 run-1 run-2 run-3 run-4 run-5 run-6 run-7 best mean std
all 1.50 1.69 1.13 1.04 0.78 0.96 1.20 2.40 0.78 1.34 0.52

Citation

@inproceedings{schlag2018tprrnn,
  title={Learning to Reason with Third Order Tensor Products},
  author={Schlag, Imanol and Schmidhuber, J{\"u}rgen},
  booktitle={Advances in Neural Information Processing Systems},
  pages={10002--10013},
  year={2018}
}

tpr-rnn's People

Contributors

ischlag avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.