by Martin KavalarAug 03 2019
Making science reproducible @nextjournal

Clojure MXNet

Run Clojure and MXNet on the GPU.

(require '[org.apache.clojure-mxnet.ndarray :as ndarray]
         '[org.apache.clojure-mxnet.context :as context])

(ndarray/->vec (ndarray/+
 (ndarray/ones [3 3] {:ctx (context/gpu 0)})
 (ndarray/ones [3 3] {:ctx (context/gpu 0)})))
Vector(9) [2, 2, 2, 2, 2, 2, 2, 2, 2]
nvidia-smi