Giter VIP home page Giter VIP logo

tirocinio's Introduction

tirocinio

Requirements:

C++11 compiler

General

parameters.json config

  • input_dim: n. of input variables
  • output_dim: n. of output variables (1)
  • hidden_dim: n. of neurons in the hidden layer
  • num_epochs: n. of training epochs
  • batch_size: size of each training sample
  • traning_samples: n. of training samples
  • learning_rate: learning rate,
  • target_column: the column to predict (calculated after ignore columns)
  • ignore: columns to be ignored

Usage

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.

Save and load model parameters (only available in Pytorch)

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 to YOUR_LOCATION
  • e : load model from YOUR_LOCATION and test it on YOUR_DATASET. Results will be saved in out.data.
  • te, et: train the model from scratch and test it on YOUR_DATASET. Model will be save in YOUR_LOCATION and results in out.data .

YOUR_LOCATION is the path to an existing directory.

Windows

  • Clone repo

Pytorch

  1. 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)
  2. Open pytorch/CMakeLists.txt with Visual Studio
  3. Wait for VS to generate CMake Cache then CMake->Build All
  4. 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).
  5. Copy (and edit) sample parameters.json in the directory where the executable is located.
  6. Run the executable. Training data must be passed from stdin.

ANNT

  • Steps 2, 3, 5, 6 but open annt/CMakeLists.txt instead of pytorch/CMakeLists.txt.

Unix

Pytorch

  1. Clone repo
  2. Download and unzip Libtorch inside tirocinio/pyorch_lib/unix/ if not present.
  3. cd tirocinio/pytorch
  4. mkdir build
  5. cd build
  6. run cmake ..
  7. Steps 5, 6 from Windows Pytorch

ANNT

  1. Clone repo
  2. Download and build ANNT inside tirocinio/annt_lib/unix/ if not present.
  3. Steps 3, 4, 5, 6 from Unix Pytorch.

tirocinio's People

Contributors

zeegomo avatar

Watchers

James Cloos avatar  avatar

Forkers

maniezzo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.