Add an option to create a sparsely connected weight matrix.
Update networks to compile feed_forward method dynamically.