Optimize NeuralNetwork __init__

Causes MASSIVE improvement in performance (~16x) that I don't really
understand. But so far it has worked as intended.