[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: From Lua to Python?
- From: Dibyendu Majumdar <mobile@...>
- Date: Thu, 13 Jul 2017 12:47:42 +0100
On 13 July 2017 at 12:07, Javier Guerra Giraldez <javier@guerrag.com> wrote:
> On 13 July 2017 at 10:44, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
>> I am not sure what has propelled Python to this spot - perhaps the
>> adoption by Google several years ago.
>
>
> I think part of the merit is in NumPY library. it was well known in
> number crunching before the "data science" moniker. Since it removes
> the iterations from Python code, it performs quite well, as long as
> your process can be expressed with the provided operators. It also
> meshes well with OpenCV and Tensor Flow, so for the current generation
> of newcomers it feels as if Python was actually an appropriate
> language for today's buzzwords.
>
Certainly having something like NumPY has made a big difference. But I
also think that Python's built in support for classes might be a
factor. Having a standard way of doing OO programming probably helps.
For numeric type stuff - the availability of array types / and
associated features such as slicing is helpful - especially as they
can be used in the C API too. This is one thing I wish I could improve
in Ravi - particularly the ability to efficiently handle multi
dimensional arrays.
> it really doesn't feel fair to the Torch project, which manages
> similar (or better) crunching performance without taking flow control
> away from the language, and had most of the convolutions and kernels
> long before Tensor Flow put that in front of the masses. OTOH, i
> think it doesn't make as straightforward to take advantage of SSE/GPU
> for extra horsepower...
>
BTW there is https://github.com/pytorch project now - so I wonder if
the work has shifted from Lua Torch to a Python based implementation.
Regards