I'm confused by several of the API choices in the example. Why is the training set part of the network? I would have expected it to be a parameter to the train() function. Same for the activation function, shouldn't this be a property of the layer rather than fixed for the network as a whole?
I get that this is just in the early stages and more for learning than anything else, but it doesn't seem very well thought-out IMO.