tangledpath / ruby-fann

Ruby library for interfacing with FANN (Fast Artificial Neural Network)

Home Page:https://github.com/tangledpath/ruby-fann

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fails on macos

djsmentya opened this issue · comments

i want to train network to sum two numbers but i have an error with this code

data = [] 
100.times { data << [rand.round(2), rand.round(2)]}
train = RubyFann::TrainData.new(:inputs=> data, :desired_outputs=> data.map{|e| e.inject(:+)})

error output:

https://gist.github.com/anonymous/c8ca1b846ed68269bdf2

both input and outputs need to be normalized to between -1 and 1