Hacker News new | ask | show | jobs
by Scipio_Afri 2096 days ago
Does autodiff exist in R? Then why not use R since it seems it also has much ML algo support due to its focus on statistics - its used by many statisticians.

Is the idea here that Swift is a more approachable language and thus this is to lower the barrier of entry to TF?

2 comments

I think the main selling points of Swift to tensorflow are:

* Speed, ML learning pipelines are often bottlenecked by the data load and transformation. TF had new mechanisms (the last I've seen was TF.data). But a language compiled to native is much more flexible in that regard.

* Type safety. Sometimes issues with the models can pop long after they have been running. The hope is that typed API's will show simple errors at compile times

* Auto differentiation built into the language. If I'm not mistaken, this is more powerful than backpropagation in TF, wich also has autodiff. The idea is that this would allow for more custom models without a performance penalty. My knowledge here is limited, since it's been over 2 years since I've implemented back propagation. I've successfully forgotten most of the things I knew about ML/DL.

I don't have any experience with R, but from what I've heard, it was known to be slow. But that might have changed or I may have misunderstood the situation.

Does not need to be built into the language. Julia does it great without special built in support. But Julia is an extremely flexible language.

Number types are first class which is a big part of it and you can add extra custom passes to the JIT compiler in regular library code.

You cannot really do autodiff in a slow language. I mean you can but nobody wants to run large machine learning training algorithms on a slow language like Python or R.

You could write autodiff in say C++ but it is a user unfriendly language not well suited for machine learning and scientific computing.

Swift is a nicer high level language you can do autodiff in. But honestly I don’t see the point with Swift either.

Julia already does AutoDiff extremely well and outperforms Swift and pretty much everybody else.