chainer.configuration.LocalConfig

class chainer.configuration.LocalConfig(global_config)[source]

Thread-local configuration of Chainer.

This class implements the local configuration. When a value is set to this object, the configuration is only updated in the current thread. When a user tries to access an attribute and there is no local value, it automatically retrieves a value from the global configuration.

Methods

show(file=sys.stdout)[source]

Prints the config entries.

The entries are sorted in the lexicographical order of the entry names.

Parameters

file – Output file-like object.

Example

You can easily print the list of configurations used in the current thread.

>>> chainer.config.show()  # doctest: +SKIP
debug           False
enable_backprop True
train           True
type_check      True