C++11 compiler
input_dim
: n. of input variablesoutput_dim
: n. of output variables (1)hidden_dim
: n. of neurons in the hidden layernum_epochs
: n. of training epochsbatch_size
: size of each training sampletraning_samples
: n. of training sampleslearning_rate
: learning rate,target_column
: the column to predict (calculated after ignore columns)ignore
: columns to be ignored
Dataset will be read from stdin.
If you launch the program without additional parameters it trains on a subset of the dataset (specified in parameters.json
) and then tests the trained model on the whole sequence.
The results of the evaluation task is available in out.data
, where the first line is the original data and the second is the predicted one.
You can use print.py
(requires matplotlib) to display those data.
If you want to save or load the trained model you have to specify a path to an existing directory where the parameters will be saved. You can do that at launch:
py-rnn MODE YOUR_LOCATION < YOUR_DATASET
MODE
specifies what the program will do:
t
: train the model from scratch and save toYOUR_LOCATION
e
: load model fromYOUR_LOCATION
and test it onYOUR_DATASET
. Results will be saved inout.data
.te
,et
: train the model from scratch and test it onYOUR_DATASET
. Model will be save inYOUR_LOCATION
and results inout.data
.
YOUR_LOCATION
is the path to an existing directory.
- Clone repo
- go to pytorch\pytorch_lib\windows\ and unzip the file (you should have pytorch\pytorch_lib\windows\libtorch, if not go inside the unzipped directory and copy the libtorch folder in the parent directory)
- Open
pytorch/CMakeLists.txt
with Visual Studio - Wait for VS to generate CMake Cache then CMake->Build All
- Copy all the .dll files in libtorch\ in the directory where the executable is located (Users\CMakeBuilds for VS 2017, tirocinio\pytorch\build.. for VS 2019).
- Copy (and edit) sample
parameters.json
in the directory where the executable is located. - Run the executable. Training data must be passed from stdin.
- Steps 2, 3, 5, 6 but open
annt/CMakeLists.txt
instead ofpytorch/CMakeLists.txt
.
- Clone repo
- Download and unzip Libtorch inside
tirocinio/pyorch_lib/unix/
if not present. cd tirocinio/pytorch
mkdir build
cd build
- run
cmake ..
- Steps 5, 6 from Windows Pytorch
- Clone repo
- Download and build ANNT inside
tirocinio/annt_lib/unix/
if not present. - Steps 3, 4, 5, 6 from Unix Pytorch.