How to build a simple neural network in 9 lines of Python code

Steve D'Aprano steve+python at pearwood.info
Tue Jun 27 21:24:03 EDT 2017


On Wed, 28 Jun 2017 06:19 am, Marko Rauhamaa wrote:

> alister <alister.ware at ntlworld.com>:
> 
>> On Tue, 27 Jun 2017 22:34:18 +0300, Marko Rauhamaa wrote:
>>
>>> John Ladasky <john_ladasky at sbcglobal.net>:
>>>> OK, that's cheating a bit, using Numpy. It's a nice little program,
>>>> but it leverages a huge, powerful library.
>>> 
>>> What would *not* be cheating? A language without a library would be
>>> dead.
>>
>> true but for a realistic comparison you should probably count all the
>> lines of code in the libruary
> 
> How's that defined? Lines of Python? Lines of C? Lines of assembly?
> Lines of microcode?
> 
> What is a line?

Microcode isn't text so it doesn't come in lines.

Obviously we're talking about source code, not object code, byte code or machine
code, since source code is the only one that is measured in lines rather than
bytes.


-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list