This repository contains a work-in-progress implementation of the architecture described in Learning Efficient Algorithms with Hierarchical Attentive Memory for TensorFlow.
Hierarchical Attentive Memory (HAM) allows for memory access in deep learning models in
The architecture can learn to sort
The initial codebase implements the HAM architecture and uses the resulting model to select the smallest value from a given input. Currently it is directly comparable to the Raw HAM module of Section 4.3 as it is not driven by an LSTM. The plan is to extend the code to perform the sorting task as described in Section 4.2.
As opposed to the HAM architecture implemented in the paper, this is the fully differentiable version referred to as DHAM (see Appendix A - Using soft attention). According to the paper, the DHAM architecture is slightly easier to train than the REINFORCE versio but does not generalize as well to larger memory sizes.
By default, python ham_sort.py
will train the HAM architecture to select the smallest input from ham.weights
at the end of each epoch and will be re-used if training is restarted.
This allows for naive curriculum schedule training by training at smaller
If the
MIT License, as per LICENSE