Contrib
Extension Context
- nnabla.contrib.context.extension_context(extension_name='cpu', **kw)[source]
Get the context of the specified extension.
All extension’s module must provide
context(**kw)
function.- Parameters:
- Returns:
The current extension context.
- Return type:
Note
Deprecated. Use :function:`nnabla.ext_utils.get_extension_context` instead.
Example
ctx = extension_context('cuda.cudnn', device_id=0) nn.set_default_context(ctx)