This folder contains the code for the model and the adaptation by learning.
Instructions to install Torch can be found here
This package can be installed by running luarocks make
in this folder.
th -e "nc=require 'nc';nc.test()"
The cli
folder contains a set of tools to use our module.
To see the command line options associated with each tool, you can run th tool.lua --help
.
train.lua
is the cli tool to either adapt an initial program or train from scratch a program based on a task configuration file.eval.lua
is the cli tool to evaluate the performances of a model.plot.lua
is the cli to plot from different metrics from the csv generated during training.gnc.lua
is the cli to perform "decompilation" on a trained model.run_xp.lua
is the cli tool to perform cross validation or run the same experiment multiple times using multiple threads. This tool does not take command line arguments but what is executed is defined inside the file here.
The examples/
folder contains a set a different sample tasks (described in the paper) and sample compiled programs to solve them.
An example with specific definition for each field can be found in the default
configuration file.
The paper-experiment/run-experiments.sh
contains the selected hyperparameters for each result reported in the paper. Since many factors can affect the RNG state, the selected random seeds may not lead to the exact same results. You cna use the run_xp.lua
script to find a correct random seed for your current system.
This packages aims at providing all the necessary tools for running and leaning the model described in the paper.
- Our differentiable RAM model is defined in
layers/dRAM.lua
. It uses the following elements:- The execution Machine in
layers/machine.lua
that will execute the command of the Controller. - All the instructions are defined in the
ops/
folder. - The initialisation of the registers is handled by the
layers/initialModule.lua
.
- The execution Machine in
- The training for the adaptation is mainly done with the
utils/trainer.lua
tool. It is based on the following elements:- The loss to learn better algorithm is defined in
layers/algCrit.lua
- The optimisation algorithms used (plain
sgd
andadam
) are in theoptim/
folder.
- The loss to learn better algorithm is defined in