Code Monkey home page Code Monkey logo

rntn's Introduction

RNTN.

This repository is based on research paper Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank and Associated Stanford website http://nlp.stanford.edu/sentiment/.

Numpy

An RNTN using only Numpy objects already works on the PTB Tree Format dataset. With no special parameter tuning (e.g. grid search optimization), with a classical Stochastic Gradient Descent, one can obtain a classification accuracy around 64%. All files are in the Numpy folder.

Theano

I then tried to add GPU methods in the code via Theano. My graphics card does not support well Cuda 6.5 but you will surely have better luck running the code on your computer.

I tried the following :

  • A. Allocating data into symbolic variables just before computing matrix operations on the GPU.

This works but very slowly - as one can expect, the cost of going there and back from the CPU to the GPU is too high to beat a pure Numpy implementation. It was a rather ineffective GPU implementation, but at least it runs and offer the same results as the Numpy implementation. All files are in the Theano - Old folder.

  • B. Creating a 'real' Theano implementation, with Shared Variables for the weights/biases within the RNTN class.

I couldn't make it work properly - obviously there is a cost problem at the moment. All files are in the Theano - Latest folder.

All these Theano codes have an argument parser to run things directly from the terminal. I did not used the AdaGrad algorithm mentioned in the paper. Also another path of exploration for this project, that could be done afterwards.

rntn's People

Contributors

alsoltani avatar

Watchers

James Cloos avatar PB 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.