AI::MXNet::Monitor - Monitor outputs, weights, and gradients for debugging.
Monitor outputs, weights, and gradients for debugging. Parameters ---------- interval : int Number of batches between printing. stat_func : function a function that computes statistics of tensors. Takes a NDArray and returns a NDArray. defaults to mean absolute value |x|/size(x). pattern : str A regular expression specifying which tensors to monitor. Only tensors with names that match name_pattern will be included. For example, '.*weight|.*output' will print all weights and outputs; '.*backward.*' will print all gradients.
install callback to executor. Supports installing to multiple exes. Parameters ---------- exe : AI::MXNet::Executor the Executor (returned by $symbol->bind) to install to.
start collecting stats for current batch. Call before forward
End collecting for current batch and return results. Call after computation of current batch. Returns ------- res : array ref of array refs with debug info
End collecting and print results
To install AI::MXNet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AI::MXNet
CPAN shell
perl -MCPAN -e shell install AI::MXNet
For more information on module installation, please visit the detailed CPAN module installation guide.