From 3403261921f84e54310cfad947628d6a32972952 Mon Sep 17 00:00:00 2001 From: mateogianolio Date: Fri, 27 May 2016 13:17:46 +0200 Subject: [PATCH] add usage instr. --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 2262409..f8255f7 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,22 @@ console.log('prediction:', prediction.indexOf(Math.max.apply(null, prediction))) // will hopefully output 1 if trained with 0-9 :) ``` +## Usage + +Clone this repository. The script is using [canvas](https://www.npmjs.com/package/canvas), so you'll need to install the **Cairo** rendering engine. On OS X, assuming you have [Homebrew](http://brew.sh) installed, this can be done with the following (copied from canvas README): + +```bash +$ brew install cairo jpeg giflib +``` + +Then install npm dependencies and test it: + +```bash +$ npm install +$ node main.js +$ node test.js +``` + ## Performance All runs below were performed with a MacBook Pro Retina 13" Early 2015 with 8GB RAM.