chainer.DebugMode

class chainer.DebugMode(debug)[source]

Debug mode context.

This class provides a context manager for debug mode. When entering the context, it sets the debug mode to the value of debug parameter with memorizing its original value. When exiting the context, it sets the debug mode back to the original value.

Deprecated since version v2.0.0: Use chainer.using_config() instead. See Debug Mode for details.

Parameters:debug (bool) – Debug mode used in the context.

Methods

__enter__()[source]
__exit__(*args)[source]