macournoyer / nn.rb

A toy Neural Network in Ruby

Home Page:http://mlcrashcourse.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

some feedback

stiller opened this issue · comments

This had me stumped for a second:

errors = layer.back_propagate(errors)

with

@neurons.zip(errors).map { |neuron, error|
      neuron.back_propagate(error) }.sum

I had to remember, that back_propagate returns a Vector, so calling sum on an array of Vectors will be a Vector addition resulting in another Vector.

I think in general the object oriented style makes it easier to follow along, but also easier to miss some of the finer points. The course sounds interesting!