org.apache.clojure-mxnet.monitor

monitor

macro

(monitor interval stat-fun)
Monitor outputs, weights, and gradients for debugging.
-  interval Number of batches between printing.
-  stat-func A function that computes statistics of tensors.
                 Takes a NDArray and returns a NDArray. defaults
                 to mean absolute value |x|/size(x). Function must be in the form of clojure (fn [x])

tic

(tic monitor)
Start collecting stats for current batch.
Call before forward

toc

(toc monitor)
End collecting for current batch and return results.
Call after computation of current batch.