Giter Site home page Giter Site logo

shubhampachori12110095 / tf-han Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shengc/tf-han

0.0 2.0 0.0 17 KB

TensorFlow Implementation For [Hierarchical Attention Networks for Document Classification](http://www.cs.cmu.edu/~./hovy/papers/16HLT-hierarchical-attention-networks.pdf)

License: Apache License 2.0

Jupyter Notebook 100.00%

tf-han's Introduction

This is the TensorFlow implementation based on the paper, "Hierarchical Attention Networks for Document Classification" .

There are a few issues at the moment,

  • It does not support mini batch at the moment. There is an issue regarding nested while_loop opened to track root cause of the issue.
  • The notebook provides an example of applying HAN to learn from 20 news group dataset. The performance on testing data set is pretty bad. The reason could be the model was not trained on the entirety of the training set. What's even more intriguing is using the GloVe word embeddings out of the box actually produces very bad results, even on training data set.

Gotcha,

  • The original paper does not use cross-entropy as the Loss function, instead it uses the negative sum of the logarithm of the probability corresponding to the correct class label.
  • There was an error in the previous implementation that treated each setence in a document separately. However they should be considered as a whole: the final state of RNN run of one sentence should be the the input state of the next sentence.

tf-han's People

Contributors

shengc avatar leakyabstraction avatar

Watchers

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