raven4752 / seq2seq_experiments

Learning to execute Python in Tensorflow and other Seq2seq examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Learning to execute Python in Tensorflow

Reimplementation of the paper Learning to execute in Tensorflow (>=1.4).

Original implementation in Torch: https://github.com/wojciechz/learning_to_execute

A Seq2Seq model is trained to execute simple Python programs.

Example:

Input:
g=6
a=-77
if a>2:
  g=a-4
print(a+g)
-----------
Target: -71
Model prediction: -71

The program generation code is simplified compared to the original paper but can easily be extended.

Date normalization

date-normalization.ipynb also contains a simple date format normalization example using the same model code.

PyCon Sweden

This work was presented at PyCon Sweden 2016, Stockholm. Presentation

About

Learning to execute Python in Tensorflow and other Seq2seq examples


Languages

Language:Python 69.8%Language:Jupyter Notebook 30.2%