Post on 12-Apr-2017
Chainer v2 αSeiya Tokui @ Preferred Networks
Chainer Meetup #04 | Feb. 23, 2017
(MinPy)
Era of dynamic graph frameworks
Chainer as a pioneer in this field
• 2015/06: v1.0
• 2015/09: v1.3 (CuPy)
• 2015/11: v1.5 (Link/Chain, CuPy in Cython)
• 2016/06: [MinPy]
• 2016/07: v1.11 (Trainer)
• 2017/01: [PyTorch, TensorFlow Fold]
• 2017/02: v2.0a
Libraries on top of Chainer
• ChainerRL (beta): https://github.com/pfnet/chainerrl
Reinforcement learning
• ChainerMN (to appear)
Multi-node distributed learning
Release plan
• Feb. 23: v2.0.0a1
• Mar. xx: v2.0.0b1
• Apr. xx: v2.0.0
How to use Chainer v2.0.0a1
pip install chainer –-pre
pip install cupy
Documentation: http://docs.chainer.org/en/v2.0.0a1/
CuPy Documentation: http://cupy.docs.chainer.org/
Features of v2.0.0a1
• CuPy is separated into an independent package
• Unified configuration / training mode
• Removed deprecated/obsolete APIs
• Interface improvements
CuPy is separated
• CuPy is now a separate project!
• https://github.com/cupy/cupy
• At the moment, the development of CuPy is still taking place
at Chainer v1
• Changes are merged to cupy/cupy after each minor release
• In the future, any changes that break compatibilities will be made in
the cupy repository
Unified configuration
Thread-local-like object to configure Chainer
• chainer.config: thread-local configuration
• chainer.global_config: process-wide configuration
• Users usually only have to touch chainer.config.
Built-in configuration entries
• debug
• enable_backprop
• train
• type_check
• (use_cudnn, deterministic: to be added)
Training mode
• All functions/classes that have training/test mode
distinctions now use chainer.config.train flag
• Evaluator automatically switches the flag
→ No need to pass train/test flags manually anymore!
Switching configuration
with chainer.using_config(‘train’, False):
... # code runs in test mode
with chainer.using_config(‘debug’, True):
... # code runs in debug mode
Removed/modified APIs
• Array-creation functions in chainer.cuda module
• FunctionSet
• wscale option of links and scale option of init_weight
(specify weight initializers instead)
• force_tuple option of F.split_axis is now set to True by
default
• Some minor updates
Major features planned for beta and final releases
• Optimizer with UpdateRule
Can specify hyperparameters for each parameter (e.g. learning rate,
hook functions)
• Uninitialized variable
Used to implement the parameter-shape placeholder
• Remove volatile flag
Use chainer.config.enable_backprop flag instead
• PyCharm-friendly Link/Chain APIs