3 ms·
This is a neat R hack; unfortunately, it is indeed a hack, which makes it tricky for conventional use cases. The tensorflow and keras R packages are interestin
by minimaxir 9y ago
This is a neat R hack; unfortunately, it is indeed a hack, which makes it tricky for conventional use cases.
The tensorflow and keras R packages are interesting and have similar parity to the Python APIs (since the packages translate the commands to Python), but using them requires a more functional approach than working with R/tidyverse. And hopefully you don’t hit a bug, as the extra layer makes debugging more difficult. (In contrast, sparklyr, an R interface to Spark, fits well into a dplyr ETL, although that’s more due to the nature of Spark DataFrames)
The tricks used in the explainer slides don’t take much advantage of the R ecosystem, unfortunately. (And I say that as someone who is very vested in the R ecosystem, but still switch to Python for anything deep learning)
- javierluraschi 9y agoAre you referring to the 'keras' R package as a hack? From your comment, it rather sounds like a disagreement in design principles, not a hack. If you are referring to the act of mixing "rmarkdown, keras and kerasjs" to run deep learning models inside a slide as a hack, that would make much more sense. Could you please clarify?
- minimaxir 9y agoThe latter, which is compounded by the nature of the former.
- javierluraschi 9y agoA lot of us post hacks under 'SHOW HN'. I honestly don't even know what's the practical application of using deep learning models within one's slides, take it for whats worth. What is more interesting to me is that one can pull together this demo pretty easily using all the new tools that have just been made available in R. Those tools are much more interesting than this post. Regarding, 'which is compounded by the nature of the former', the argument from the comment seems to be that creating a layer of something makes things worse, this is not necessarily the case. Abstraction layers are one of the most powerful and reliable tools in software engineering. For instance, I would much rather write a layer of C++ code that wraps assembly code. Others can choose to create layers over C++ and so on, it's all good.
- zeckalpha 9y agoInteresting, I’ve found tidyverse to be quite functional in style...