Monitor interface.
More...
#include <monitor.h>
Monitor constructor.
- Parameters
-
interval | Number of batches between printing. |
pattern | A regular expression specifying which tensors to monitor. |
stat_func | A function that computes statistics of tensors. Defaults to mean absolute value |x|/size(x). |
static void mxnet::cpp::Monitor::executor_callback |
( |
const char * |
name, |
|
|
NDArrayHandle |
ndarray, |
|
|
void * |
monitor_ptr |
|
) |
| |
|
staticprotected |
void mxnet::cpp::Monitor::install |
( |
Executor * |
exe | ) |
|
install callback to executor. Supports installing to multiple executors.
- Parameters
-
exe | The executor to install to. |
void mxnet::cpp::Monitor::tic |
( |
| ) |
|
Start collecting stats for current batch. Call before calling forward.
std::vector<Stat> mxnet::cpp::Monitor::toc |
( |
| ) |
|
End collecting for current batch and return results. Call after computation of current batch.
void mxnet::cpp::Monitor::toc_print |
( |
| ) |
|
End collecting and print results.
bool mxnet::cpp::Monitor::activated |
|
protected |
std::vector<Executor*> mxnet::cpp::Monitor::exes |
|
protected |
int mxnet::cpp::Monitor::interval |
|
protected |
std::regex mxnet::cpp::Monitor::pattern |
|
protected |
std::vector<Stat> mxnet::cpp::Monitor::stats |
|
protected |
int mxnet::cpp::Monitor::step |
|
protected |
The documentation for this class was generated from the following file: