Chainer v2 alpha

15
Chainer v2 α Seiya Tokui @ Preferred Networks Chainer Meetup #04 | Feb. 23, 2017

Transcript of Chainer v2 alpha

Page 1: Chainer v2 alpha

Chainer v2 αSeiya Tokui @ Preferred Networks

Chainer Meetup #04 | Feb. 23, 2017

Page 2: Chainer v2 alpha

(MinPy)

Era of dynamic graph frameworks

Page 3: Chainer v2 alpha

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

Page 4: Chainer v2 alpha

Libraries on top of Chainer

• ChainerRL (beta): https://github.com/pfnet/chainerrl

Reinforcement learning

• ChainerMN (to appear)

Multi-node distributed learning

Page 5: Chainer v2 alpha

Release plan

• Feb. 23: v2.0.0a1

• Mar. xx: v2.0.0b1

• Apr. xx: v2.0.0

Page 6: Chainer v2 alpha

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/

Page 7: Chainer v2 alpha

Features of v2.0.0a1

• CuPy is separated into an independent package

• Unified configuration / training mode

• Removed deprecated/obsolete APIs

• Interface improvements

Page 8: Chainer v2 alpha

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

Page 9: Chainer v2 alpha

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.

Page 10: Chainer v2 alpha

Built-in configuration entries

• debug

• enable_backprop

• train

• type_check

• (use_cudnn, deterministic: to be added)

Page 11: Chainer v2 alpha

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!

Page 12: Chainer v2 alpha

Switching configuration

with chainer.using_config(‘train’, False):

... # code runs in test mode

with chainer.using_config(‘debug’, True):

... # code runs in debug mode

Page 13: Chainer v2 alpha

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

Page 14: Chainer v2 alpha

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

Page 15: Chainer v2 alpha