Git Product home page Git Product logo

ngs's Introduction

Neural-Grammar-Symbolic Learning with Back-Search

Pytorch implementation for Neural-Grammar-Symbolic Learning with Back-Search (NGS-BS) on the Handwritten Formula Recognition task.

Publication

Closed Loop Neural-Symbolic Learning via Integrating Neural Perception, Grammar Parsing, and Symbolic Reasoning
Qing Li, Siyuan Huang, Yining Hong, Yixin Chen, Ying Nian Wu, and Song-Chun Zhu
In International Conference on Machine Learning (ICML) 2020.

@inproceedings{li2020ngs,
  title={Closed Loop Neural-Symbolic Learning via Integrating Neural Perception, Grammar Parsing, and Symbolic Reasoning},
  author={Li, Qing and Huang, Siyuan and Hong, Yining and Chen, Yixin and Wu, Ying Nian and Zhu, Song-Chun.},
  booktitle={International Conference on Machine Learning (ICML)},
  year={2020}
}

Prerequisites

  • Ubuntu 16.04
  • Python 3.7
  • NVIDIA TITAN RTX + CUDA 10.0
  • PyTorch 1.4.0

Getting started

  1. Download the Handwritten Formula Recognition dataset from google drive and unzip it:
unzip HWF.zip
  1. Create an environment with all packages from requirements.txt installed (Note: please double check the CUDA version on your machine and install pytorch accordingly):
conda create -y -n ngs python=3.7
source activate ngs
pip install -r requirements.txt

Train the models

To reproduce the experiment results, we can simply run the following code:

sh run.sh

This script will train different model variants and save the training logs into the output directory. Since it will take a long time for the RL and MAPO baselines to converge, we put the final training logs in the results folder.

Plot the training curves

To plot the training curves, run:

jupyter notebook

Open the plot_results.ipynb and run all cells.

ngs's People

Contributors

liqing-ustc avatar

Watchers

 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.