This project has retired. For details please refer to its Attic page.
org.apache.clojure-mxnet.resource-scope documentation

org.apache.clojure-mxnet.resource-scope

using

macro

(using & forms)
Uses a Resource Scope for all forms. This is a way to manage all Native Resources like NDArray and Symbol - it will deallocate all Native Resources by calling close on them automatically. It will not call close on Native Resources returned from the form.
Example:
(resource-scope/using
 (let [temp-x (ndarray/ones [3 1])
      temp-y (ndarray/ones [3 1])]
  (ndarray/+ temp-x temp-y))) 

with-do

macro

(with-do & forms)
Alias for a do within a resource scope using.
Example:
(resource-scope/with-do
  (ndarray/ones [3 1])
  :all-cleaned-up)

with-let

macro

(with-let & forms)
Alias for a let within a resource scope using.
Example:
(resource-scope/with-let [temp-x (ndarray/ones [3 1])
                          temp-y (ndarray/ones [3 1])]
(ndarray/+ temp-x temp-y))