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

John Ladasky john_ladasky at sbcglobal.net
Thu Jun 29 05:34:53 EDT 2017


On Tuesday, June 27, 2017 at 7:28:58 PM UTC-7, Steve D'Aprano wrote:
> On Wed, 28 Jun 2017 06:22 am, Marko Rauhamaa wrote:
> 
> > 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?
> 
> 
> Of course not. That demonstrates beautifully (or perhaps "unreadably tersely")
> that the APL language primitives are extremely powerful (too powerful?).

Interesting how this discussion has detoured into APL.  I think that these comments underscore my point that Numpy's way of doing things isn't quite Python's way of doing things, that it's a little esoteric.

I don't know APL, but...  some years ago, I remember reading that the concept of a scalar did not exist in APL.  The equivalent of a scalar in APL is (if I understand correctly) a one-dimensional array with one element in it.  

When I first read that, I thought it was a needless complication.

After ten years of Numpy and three months of TensorFlow, it's starting to dawn on me why that might actually make programming sense... if you're thinking in matrix algebra all the time, which increasingly, I find myself doing.



More information about the Python-list mailing list