How to build a simple neural network in 9 lines of Python code
Gregory Ewing
greg.ewing at canterbury.ac.nz
Wed Jun 28 05:11:25 EDT 2017
Steve D'Aprano wrote:
> It should be obvious that if you allow the use of external
> libraries that can contain arbitrary amounts of code, *without* counting that
> external code towards your measure of code complexity, you get a bogus
> measurement of code complexity.
Numpy isn't really doing a lot here, just saving you from
having to write some explicit loops. The code would be
maybe 2 or 3 times bigger at most without it.
What this example says to me is not so much how powerful
Python is, but how simple in essence neural networks are.
--
Greg
More information about the Python-list
mailing list