Re:The beauty of functional languages in deep learning – Clo...
by xpertmadman on Thursday September 12, 2019 @11:30AM
(#20952601)
While Clojure code itself is not running on the GPU, we still do have Deep Learning in Clojure enabled by Neanderthal/OpenCL.
/u/dragandj is quite active here, you can ask him!
The nice parallelism allowed by Clojure is for CPU threads not GPU threads. It would still need to rely on an external library for tensor operations, for instance ATen [1], the C++ backend of PyTorch.
On the other hand, Functional Programming can be useful to describe the model at a higher level and better handle the scheduling of each component (Convolution, LSTM, etc) on GPU. When training model, the batch size already allows near optimal usage of a GPU cores, however when doing evaluation, this becomes more relevant.
[1] https://pytorch.org/cppdocs/