(Symbolic Math) Reimplementation of Deep Learning for Symbolic Mathematics
A reimplementation of Lample & Charton (2019) Deep Learning for Symbolic Mathematics
- generate random math expressions in binary tree form (
random_trees.py
) - map tree to prefix (
random_trees.py
) - prefix to infix (
infix_prefix.py
) - infix to prefix (
infix_prefix.py
)
backward_generation.ipynb
- generate trees, generate target usingsympy
, simplify, make sequence (input & target)
Can also run
$ python generate_dataset.py --cpu 12 --num 10000 --n 8
-
seq2seq_model.ipynb
basic model -
transformer.ipynb
trains model in google cloud.