mindarmour.utils
Util methods of MindArmour.
- class
mindarmour.utils.
LogUtil
[source] Logging module.
- Raises
SyntaxError – If create this class.
addhandler
(_handler)[source]Add other handler supported by logging module.
- Parameters
handler (logging.Handler) – Other handler supported by logging module.
Raises
- ValueError – If handler is not an instance of logging.Handler.
debug
(tag, msg, *args)[source]Log ‘[tag] msg % args’ with severity ‘DEBUG’.
error
(tag, msg, *args)[source]Log ‘[tag] msg % args’ with severity ‘ERROR’.
static
get_instance
()[source]Get instance of class LogUtil.
- Returns
- Object, instance of class LogUtil.
info
(tag, msg, *args)[source]Log ‘[tag] msg % args’ with severity ‘INFO’.
setlevel
(_level)[source]Set the logging level of this logger, level must be an integer or astring.
warn
(tag, msg, *args)[source]Log ‘[tag] msg % args’ with severity ‘WARNING’.
- class
mindarmour.utils.
GradWrapWithLoss
(network)[source] Construct a network to compute the gradient of loss function in input spaceand weighted by weight.
- class
mindarmour.utils.
GradWrap
(network)[source] Construct a network to compute the gradient of network outputs in inputspace and weighted by weight, expressed as a jacobian matrix.