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

Chris Angelico rosuav at gmail.com
Tue Jun 27 16:52:51 EDT 2017


On Wed, Jun 28, 2017 at 6:22 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
> Chris Angelico <rosuav at gmail.com>:
>
>> On Wed, Jun 28, 2017 at 5:34 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
>>> What would *not* be cheating? A language without a library would be
>>> dead.
>>
>> Sure, but there are different levels of cheating. Using a
>> general-purpose programming language and its standard library isn't
>> usually considered cheating, but using a language or library that's
>> specifically designed for this purpose is less about "hey look how
>> simple this is" and more about "hey look how awesome this lang/lib
>> is". Which is a perfectly reasonable thing to brag; Python is
>> beautifully expressive in the general case, but there are some amazing
>> tools for special purposes.
>>
>> So I wouldn't call it cheating; it's a demonstration of the
>> expressiveness of numpy.
>
> You saw the APL example, right? APL's standard runtime/library contains
> most of Numpy functionality because that's what APL has been designed
> for.
>
> Is that cheating?

No, for the same reason. What it demonstrates is the terseness of APL
when used for its exact use case.

Ultimately, everything is implemented using lower level code. Isn't it
impressive how easily a computer can add two integers? Trying to do
the same thing in dominoes takes a lot of code:

http://www.numberphile.com/videos/domino_circuit.html

Should we count program code in domino equivalence?

ChrisA



More information about the Python-list mailing list