A template copy for neural networks by David Miller, http://millermattson.com/dave