SlideShare a Scribd company logo
1 of 17
Download to read offline
Chainer Update
v1.8.0 -> v1.10.0+
Chainer Meetup #03 @ Dwango
Seiya Tokui, Preferred Networks, Inc.
2016/07/02
Updates v1.8.0 -> v1.10.0
2
Many updates since the last meetup
 v1.8.0 (April 12)
 v1.9.0 (May 31)
 v1.10.0 (June 28)
 Many contributions from the community. Thank you very much!!!!!
(30 PRs from non-PFI/PFNers have been merged since the last meetup in
March)
3
New core features
 CaffeFunction improved: support Py3, support the ResNet models
 Weight initializer
– Most links start supporting initializer to initialize the parameters
– Sample:
import chainer.links as L, chainer.initializers as I
L.Linear(784, 1000, initialW=I.Normal(0.01),
initialb=I.Constant(0.1))
– Many built-in initializers
– You can also write your own initializer easily
(it is just a function/callable that initializes the elements of a given CPU array)
 Support float16 and float64 in many Functions
 CuPy Profiling API
4
New core feature (cont.)
 ndarray arguments for Functions
– Function now accepts NumPy/CuPy ndarrays as arguments
– It automatically wraps the arrays by Variable
– Users do not have to wrap arrays by Variable manually
5
Many Functions/Links are added
 Variable.__getitem__ (F.get_item)
– Variable now supports the basic indexing (cf. NumPy) with backprop
– It supports: integer indexing, slice indexing, newaxis, Ellipsis
– E.g.: slice indexing can be used to crop feature maps
 Array manipulation: cast, clip, log1p, expm1, logsumexp, minimum, permutate
 NN elements: huber_loss, hard_sigmoid, roi_pooling_2d, StatelessLSTM, Bias,
Scale
 There are also many updates on existing Functions/Links (new options,
bug fixes, etc.)
 See the recent release notes for the full list of new Functions/Links
https://github.com/pfnet/chainer/releases
6
New CuPy functions
 cupy.nonzero
– Enumerates the indices of non-zero elements
– It implements inclusive scan kernel in CUDA
– We are willing to support a wider range of routines that require the scan
kernel (like cumsum)
 In parallel, some routines using nonzero are added: cupy.ix_,
cupy.flatnonzero
 Profiling API (cupy.cuda.profile, cupy.cuda.profiler) to enable CUDA
profile collection only in a specified range of codes
7
Issue: slow merge of PRs. Solution: more minor releases
 As I noted, there are now many PRs coming to the Chainer repository
 The current release cycle of minor updates per 6 weeks is too slow
 We decided to make minor releases more frequently
Until v1.9.0:
 Revision release (without new features) for every 2 weeks
 Minor release (with new features) for every 6 weeks
From v1.10.0:
 Release for every 2 weeks
 Any release can contain new features (we increment the minor version
in that case)
8
Planned updates after v1.10.0
9
Planned big features for upcoming releases (v1.11-12)
 Dataset and Trainer (will be explained)
 cuDNN RNN support
 Theano function support (use a Theano function as a Chainer Function)
 Asynchronous to_gpu
Target Link
Dataset
Optimizer
Iterator
Dataset and Trainer
 Dataset: Abstraction of iterations over datasets
 Trainer: Abstraction of training loops
11
Trainer
Extension
Extension
Extension
Updater Optimizer
Optimizer
Target Link
Target Link
Iterator
Iterator
Dataset
Dataset
We often use only one
optimizer and one
dataset. This diagram
shows a general case.
Trainer
 Call the Updater and Extensions for every iteration
 Updater
– Fetch a mini-batch using Iterator, and update parameters using Optimizer
– You can customize the update routine
– Built-in updater: StandardUpdater, ParallelUpdater (under review)
(ParallelUpdater provides an easy way of data-parallel learning)
 Extension
– It adds an extra routine to the training loop
– Basic extensions are built-in:
Evaluator, LogReport, PrintReport, ProgressBar
snapshot, snapshot_object, ExponentialDecay, LinearShift
dump_graph
– You can write your own extensions
12
Dataset / Iterator
 Dataset is just a sequence of data points (a.k.a. examples)
 Iterator defines how to iterate over the dataset
 Built-in iterators:
– SequentialIterator
– ShuffledIterator
– MultiprocessIterator
(you can easily support multiprocess preprocessing with it)
13
Reporter: easy way to report an observation
Trainer uses Reporter to collect observations
(e.g. loss value, accuracy, activation statistics, etc.)
Example (simple Classifier):
class Classifier(chainer.Chain):
def __init__(self, predictor):
super(Classifier, self).__init__(predictor=predictor)
def __call__(self, x, t):
y = self.predictor(x)
loss = F.softmax_cross_entropy(y, t)
accuracy = F.accuracy(y, t)
chainer.report({‘loss’: loss, ‘accuracy’: accuracy},
observer=self)
return loss
14
MNIST Example
15
・・・
Dataset and Iterators
Updater and Trainer
Extensions
Launch training loop
Model and Optimizer
Note on Trainer
 If your training workflow is very different from standard ones, you can
still write your own training loop
 We recommend you to use Trainer for newly-written training scripts
– Most usages are covered by the Trainer
– You can flexibly customize each component of Trainer
16
We are planning the first major version up!
 Planning to release it in this autumn (Oct. – Nov.)
 It will breaks the backward compatibility
Planned features
 Separate CuPy into a separate repository/package
 Plugin system and service (we need discussions with you!)
(share Functions/Links/etc. easily with other users without sending PRs)
 Backprop as a graph (or gradient of expressions including gradients)
 Parameter shape inference (without specifying “input size”)
 Make asynchronous CPU/GPU transfer by default
 Parameter annotation
17

More Related Content

What's hot

What's hot (20)

Introduction to Chainer: A Flexible Framework for Deep Learning
Introduction to Chainer: A Flexible Framework for Deep LearningIntroduction to Chainer: A Flexible Framework for Deep Learning
Introduction to Chainer: A Flexible Framework for Deep Learning
 
Chainer ui v0.3 and imagereport
Chainer ui v0.3 and imagereportChainer ui v0.3 and imagereport
Chainer ui v0.3 and imagereport
 
Chainer v4 and v5
Chainer v4 and v5Chainer v4 and v5
Chainer v4 and v5
 
Automatically Fusing Functions on CuPy
Automatically Fusing Functions on CuPyAutomatically Fusing Functions on CuPy
Automatically Fusing Functions on CuPy
 
Introduction to Chainer
Introduction to ChainerIntroduction to Chainer
Introduction to Chainer
 
Introduction to Chainer
Introduction to ChainerIntroduction to Chainer
Introduction to Chainer
 
Comparison of deep learning frameworks from a viewpoint of double backpropaga...
Comparison of deep learning frameworks from a viewpoint of double backpropaga...Comparison of deep learning frameworks from a viewpoint of double backpropaga...
Comparison of deep learning frameworks from a viewpoint of double backpropaga...
 
PyTorch crash course
PyTorch crash coursePyTorch crash course
PyTorch crash course
 
FCN-Based 6D Robotic Grasping for Arbitrary Placed Objects
FCN-Based 6D Robotic Grasping for Arbitrary Placed ObjectsFCN-Based 6D Robotic Grasping for Arbitrary Placed Objects
FCN-Based 6D Robotic Grasping for Arbitrary Placed Objects
 
CuPy: A NumPy-compatible Library for GPU
CuPy: A NumPy-compatible Library for GPUCuPy: A NumPy-compatible Library for GPU
CuPy: A NumPy-compatible Library for GPU
 
CuPy v4 and v5 roadmap
CuPy v4 and v5 roadmapCuPy v4 and v5 roadmap
CuPy v4 and v5 roadmap
 
Porting and optimizing UniFrac for GPUs
Porting and optimizing UniFrac for GPUsPorting and optimizing UniFrac for GPUs
Porting and optimizing UniFrac for GPUs
 
Tensorflow internal
Tensorflow internalTensorflow internal
Tensorflow internal
 
PyTorch Tutorial for NTU Machine Learing Course 2017
PyTorch Tutorial for NTU Machine Learing Course 2017PyTorch Tutorial for NTU Machine Learing Course 2017
PyTorch Tutorial for NTU Machine Learing Course 2017
 
Notes from 2016 bay area deep learning school
Notes from 2016 bay area deep learning school Notes from 2016 bay area deep learning school
Notes from 2016 bay area deep learning school
 
Advanced Spark and TensorFlow Meetup May 26, 2016
Advanced Spark and TensorFlow Meetup May 26, 2016Advanced Spark and TensorFlow Meetup May 26, 2016
Advanced Spark and TensorFlow Meetup May 26, 2016
 
Intro to TensorFlow and PyTorch Workshop at Tubular Labs
Intro to TensorFlow and PyTorch Workshop at Tubular LabsIntro to TensorFlow and PyTorch Workshop at Tubular Labs
Intro to TensorFlow and PyTorch Workshop at Tubular Labs
 
Accelerating microbiome research with OpenACC
Accelerating microbiome research with OpenACCAccelerating microbiome research with OpenACC
Accelerating microbiome research with OpenACC
 
[Update] PyTorch Tutorial for NTU Machine Learing Course 2017
[Update] PyTorch Tutorial for NTU Machine Learing Course 2017[Update] PyTorch Tutorial for NTU Machine Learing Course 2017
[Update] PyTorch Tutorial for NTU Machine Learing Course 2017
 
Python multithreaded programming
Python   multithreaded programmingPython   multithreaded programming
Python multithreaded programming
 

Viewers also liked

Viewers also liked (20)

Chainerを使って細胞を数えてみた
Chainerを使って細胞を数えてみたChainerを使って細胞を数えてみた
Chainerを使って細胞を数えてみた
 
NVIDIA 更新情報: Tesla P100 PCIe/cuDNN 5.1
NVIDIA 更新情報: Tesla P100 PCIe/cuDNN 5.1NVIDIA 更新情報: Tesla P100 PCIe/cuDNN 5.1
NVIDIA 更新情報: Tesla P100 PCIe/cuDNN 5.1
 
深層学習ライブラリの環境問題Chainer Meetup2016 07-02
深層学習ライブラリの環境問題Chainer Meetup2016 07-02深層学習ライブラリの環境問題Chainer Meetup2016 07-02
深層学習ライブラリの環境問題Chainer Meetup2016 07-02
 
ヤフー音声認識サービスでのディープラーニングとGPU利用事例
ヤフー音声認識サービスでのディープラーニングとGPU利用事例ヤフー音声認識サービスでのディープラーニングとGPU利用事例
ヤフー音声認識サービスでのディープラーニングとGPU利用事例
 
俺のtensorが全然flowしないのでみんなchainer使おう by DEEPstation
俺のtensorが全然flowしないのでみんなchainer使おう by DEEPstation俺のtensorが全然flowしないのでみんなchainer使おう by DEEPstation
俺のtensorが全然flowしないのでみんなchainer使おう by DEEPstation
 
Chainer, Cupy入門
Chainer, Cupy入門Chainer, Cupy入門
Chainer, Cupy入門
 
マシンパーセプション研究におけるChainer活用事例
マシンパーセプション研究におけるChainer活用事例マシンパーセプション研究におけるChainer活用事例
マシンパーセプション研究におけるChainer活用事例
 
Deep parking
Deep parkingDeep parking
Deep parking
 
LT@Chainer Meetup
LT@Chainer MeetupLT@Chainer Meetup
LT@Chainer Meetup
 
Chainer Meetup LT (Alpaca)
Chainer Meetup LT (Alpaca)Chainer Meetup LT (Alpaca)
Chainer Meetup LT (Alpaca)
 
A Chainer MeetUp Talk
A Chainer MeetUp TalkA Chainer MeetUp Talk
A Chainer MeetUp Talk
 
Chainer meetup
Chainer meetupChainer meetup
Chainer meetup
 
Towards Chainer v1.5
Towards Chainer v1.5Towards Chainer v1.5
Towards Chainer v1.5
 
Chainer meetup20151014
Chainer meetup20151014Chainer meetup20151014
Chainer meetup20151014
 
Chainer Development Plan 2015/12
Chainer Development Plan 2015/12Chainer Development Plan 2015/12
Chainer Development Plan 2015/12
 
Capitalicoでのchainer 1.1 → 1.5 バージョンアップ事例
Capitalicoでのchainer 1.1 → 1.5 バージョンアップ事例Capitalicoでのchainer 1.1 → 1.5 バージョンアップ事例
Capitalicoでのchainer 1.1 → 1.5 バージョンアップ事例
 
深層学習ライブラリのプログラミングモデル
深層学習ライブラリのプログラミングモデル深層学習ライブラリのプログラミングモデル
深層学習ライブラリのプログラミングモデル
 
Chainer入門と最近の機能
Chainer入門と最近の機能Chainer入門と最近の機能
Chainer入門と最近の機能
 
Lighting talk chainer hands on
Lighting talk chainer hands onLighting talk chainer hands on
Lighting talk chainer hands on
 
Chainer Contribution Guide
Chainer Contribution GuideChainer Contribution Guide
Chainer Contribution Guide
 

Similar to Chainer Update v1.8.0 -> v1.10.0+

Similar to Chainer Update v1.8.0 -> v1.10.0+ (20)

Managing Postgres with Ansible
Managing Postgres with AnsibleManaging Postgres with Ansible
Managing Postgres with Ansible
 
OSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life Examples
OSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life ExamplesOSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life Examples
OSMC 2021 | Monitoring Open Infrastructure Logs – With Real Life Examples
 
Kash Kubernetified
Kash KubernetifiedKash Kubernetified
Kash Kubernetified
 
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
 
springn batch tutorial
springn batch tutorialspringn batch tutorial
springn batch tutorial
 
Elefrant [ng-Poznan]
Elefrant [ng-Poznan]Elefrant [ng-Poznan]
Elefrant [ng-Poznan]
 
Project Reactor Now and Tomorrow
Project Reactor Now and TomorrowProject Reactor Now and Tomorrow
Project Reactor Now and Tomorrow
 
RxJava 2 Reactive extensions for the JVM
RxJava 2  Reactive extensions for the JVMRxJava 2  Reactive extensions for the JVM
RxJava 2 Reactive extensions for the JVM
 
Monitoring MySQL with Prometheus and Grafana
Monitoring MySQL with Prometheus and GrafanaMonitoring MySQL with Prometheus and Grafana
Monitoring MySQL with Prometheus and Grafana
 
OSMC 2017 | Monitoring MySQL with Prometheus and Grafana by Julien Pivotto
OSMC 2017 | Monitoring  MySQL with Prometheus and Grafana by Julien PivottoOSMC 2017 | Monitoring  MySQL with Prometheus and Grafana by Julien Pivotto
OSMC 2017 | Monitoring MySQL with Prometheus and Grafana by Julien Pivotto
 
Automated tests to a REST API
Automated tests to a REST APIAutomated tests to a REST API
Automated tests to a REST API
 
PuppetConf 2016: Watching the Puppet Show – Sean Porter, Heavy Water Operations
PuppetConf 2016: Watching the Puppet Show – Sean Porter, Heavy Water OperationsPuppetConf 2016: Watching the Puppet Show – Sean Porter, Heavy Water Operations
PuppetConf 2016: Watching the Puppet Show – Sean Porter, Heavy Water Operations
 
Manual de instalacion pentaho
Manual de instalacion pentahoManual de instalacion pentaho
Manual de instalacion pentaho
 
Kafka zero to hero
Kafka zero to heroKafka zero to hero
Kafka zero to hero
 
Apache Kafka - From zero to hero
Apache Kafka - From zero to heroApache Kafka - From zero to hero
Apache Kafka - From zero to hero
 
3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf
 
Oracle applications r12.2, ebr, online patching means lot of work for devel...
Oracle applications r12.2, ebr, online patching   means lot of work for devel...Oracle applications r12.2, ebr, online patching   means lot of work for devel...
Oracle applications r12.2, ebr, online patching means lot of work for devel...
 
Monitoring&Logging - Stanislav Kolenkin
Monitoring&Logging - Stanislav Kolenkin  Monitoring&Logging - Stanislav Kolenkin
Monitoring&Logging - Stanislav Kolenkin
 
Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...Building Continuous Application with Structured Streaming and Real-Time Data ...
Building Continuous Application with Structured Streaming and Real-Time Data ...
 
Why so continuous
Why so continuousWhy so continuous
Why so continuous
 

More from Seiya Tokui

More from Seiya Tokui (20)

Chainer/CuPy v5 and Future (Japanese)
Chainer/CuPy v5 and Future (Japanese)Chainer/CuPy v5 and Future (Japanese)
Chainer/CuPy v5 and Future (Japanese)
 
Learning stochastic neural networks with Chainer
Learning stochastic neural networks with ChainerLearning stochastic neural networks with Chainer
Learning stochastic neural networks with Chainer
 
深層学習フレームワーク Chainer の開発と今後の展開
深層学習フレームワーク Chainer の開発と今後の展開深層学習フレームワーク Chainer の開発と今後の展開
深層学習フレームワーク Chainer の開発と今後の展開
 
論文紹介 Pixel Recurrent Neural Networks
論文紹介 Pixel Recurrent Neural Networks論文紹介 Pixel Recurrent Neural Networks
論文紹介 Pixel Recurrent Neural Networks
 
Differences of Deep Learning Frameworks
Differences of Deep Learning FrameworksDifferences of Deep Learning Frameworks
Differences of Deep Learning Frameworks
 
生成モデルの Deep Learning
生成モデルの Deep Learning生成モデルの Deep Learning
生成モデルの Deep Learning
 
Deep Learningの基礎と応用
Deep Learningの基礎と応用Deep Learningの基礎と応用
Deep Learningの基礎と応用
 
Chainerの使い方と自然言語処理への応用
Chainerの使い方と自然言語処理への応用Chainerの使い方と自然言語処理への応用
Chainerの使い方と自然言語処理への応用
 
論文紹介 Compressing Neural Networks with the Hashing Trick
論文紹介 Compressing Neural Networks with the Hashing Trick論文紹介 Compressing Neural Networks with the Hashing Trick
論文紹介 Compressing Neural Networks with the Hashing Trick
 
深層学習フレームワークChainerの紹介とFPGAへの期待
深層学習フレームワークChainerの紹介とFPGAへの期待深層学習フレームワークChainerの紹介とFPGAへの期待
深層学習フレームワークChainerの紹介とFPGAへの期待
 
論文紹介 Semi-supervised Learning with Deep Generative Models
論文紹介 Semi-supervised Learning with Deep Generative Models論文紹介 Semi-supervised Learning with Deep Generative Models
論文紹介 Semi-supervised Learning with Deep Generative Models
 
Recurrent Neural Networks
Recurrent Neural NetworksRecurrent Neural Networks
Recurrent Neural Networks
 
Deep learning実装の基礎と実践
Deep learning実装の基礎と実践Deep learning実装の基礎と実践
Deep learning実装の基礎と実践
 
Deep Learning技術の今
Deep Learning技術の今Deep Learning技術の今
Deep Learning技術の今
 
NIPS2013読み会 DeViSE: A Deep Visual-Semantic Embedding Model
NIPS2013読み会 DeViSE: A Deep Visual-Semantic Embedding ModelNIPS2013読み会 DeViSE: A Deep Visual-Semantic Embedding Model
NIPS2013読み会 DeViSE: A Deep Visual-Semantic Embedding Model
 
ICML2013読み会 Local Deep Kernel Learning for Efficient Non-linear SVM Prediction
ICML2013読み会 Local Deep Kernel Learning for Efficient Non-linear SVM PredictionICML2013読み会 Local Deep Kernel Learning for Efficient Non-linear SVM Prediction
ICML2013読み会 Local Deep Kernel Learning for Efficient Non-linear SVM Prediction
 
Deep Learningの技術と未来
Deep Learningの技術と未来Deep Learningの技術と未来
Deep Learningの技術と未来
 
Tprimal agh
Tprimal aghTprimal agh
Tprimal agh
 
rinko2011-agh
rinko2011-aghrinko2011-agh
rinko2011-agh
 
rinko2010
rinko2010rinko2010
rinko2010
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 

Chainer Update v1.8.0 -> v1.10.0+

  • 1. Chainer Update v1.8.0 -> v1.10.0+ Chainer Meetup #03 @ Dwango Seiya Tokui, Preferred Networks, Inc. 2016/07/02
  • 2. Updates v1.8.0 -> v1.10.0 2
  • 3. Many updates since the last meetup  v1.8.0 (April 12)  v1.9.0 (May 31)  v1.10.0 (June 28)  Many contributions from the community. Thank you very much!!!!! (30 PRs from non-PFI/PFNers have been merged since the last meetup in March) 3
  • 4. New core features  CaffeFunction improved: support Py3, support the ResNet models  Weight initializer – Most links start supporting initializer to initialize the parameters – Sample: import chainer.links as L, chainer.initializers as I L.Linear(784, 1000, initialW=I.Normal(0.01), initialb=I.Constant(0.1)) – Many built-in initializers – You can also write your own initializer easily (it is just a function/callable that initializes the elements of a given CPU array)  Support float16 and float64 in many Functions  CuPy Profiling API 4
  • 5. New core feature (cont.)  ndarray arguments for Functions – Function now accepts NumPy/CuPy ndarrays as arguments – It automatically wraps the arrays by Variable – Users do not have to wrap arrays by Variable manually 5
  • 6. Many Functions/Links are added  Variable.__getitem__ (F.get_item) – Variable now supports the basic indexing (cf. NumPy) with backprop – It supports: integer indexing, slice indexing, newaxis, Ellipsis – E.g.: slice indexing can be used to crop feature maps  Array manipulation: cast, clip, log1p, expm1, logsumexp, minimum, permutate  NN elements: huber_loss, hard_sigmoid, roi_pooling_2d, StatelessLSTM, Bias, Scale  There are also many updates on existing Functions/Links (new options, bug fixes, etc.)  See the recent release notes for the full list of new Functions/Links https://github.com/pfnet/chainer/releases 6
  • 7. New CuPy functions  cupy.nonzero – Enumerates the indices of non-zero elements – It implements inclusive scan kernel in CUDA – We are willing to support a wider range of routines that require the scan kernel (like cumsum)  In parallel, some routines using nonzero are added: cupy.ix_, cupy.flatnonzero  Profiling API (cupy.cuda.profile, cupy.cuda.profiler) to enable CUDA profile collection only in a specified range of codes 7
  • 8. Issue: slow merge of PRs. Solution: more minor releases  As I noted, there are now many PRs coming to the Chainer repository  The current release cycle of minor updates per 6 weeks is too slow  We decided to make minor releases more frequently Until v1.9.0:  Revision release (without new features) for every 2 weeks  Minor release (with new features) for every 6 weeks From v1.10.0:  Release for every 2 weeks  Any release can contain new features (we increment the minor version in that case) 8
  • 10. Planned big features for upcoming releases (v1.11-12)  Dataset and Trainer (will be explained)  cuDNN RNN support  Theano function support (use a Theano function as a Chainer Function)  Asynchronous to_gpu
  • 11. Target Link Dataset Optimizer Iterator Dataset and Trainer  Dataset: Abstraction of iterations over datasets  Trainer: Abstraction of training loops 11 Trainer Extension Extension Extension Updater Optimizer Optimizer Target Link Target Link Iterator Iterator Dataset Dataset We often use only one optimizer and one dataset. This diagram shows a general case.
  • 12. Trainer  Call the Updater and Extensions for every iteration  Updater – Fetch a mini-batch using Iterator, and update parameters using Optimizer – You can customize the update routine – Built-in updater: StandardUpdater, ParallelUpdater (under review) (ParallelUpdater provides an easy way of data-parallel learning)  Extension – It adds an extra routine to the training loop – Basic extensions are built-in: Evaluator, LogReport, PrintReport, ProgressBar snapshot, snapshot_object, ExponentialDecay, LinearShift dump_graph – You can write your own extensions 12
  • 13. Dataset / Iterator  Dataset is just a sequence of data points (a.k.a. examples)  Iterator defines how to iterate over the dataset  Built-in iterators: – SequentialIterator – ShuffledIterator – MultiprocessIterator (you can easily support multiprocess preprocessing with it) 13
  • 14. Reporter: easy way to report an observation Trainer uses Reporter to collect observations (e.g. loss value, accuracy, activation statistics, etc.) Example (simple Classifier): class Classifier(chainer.Chain): def __init__(self, predictor): super(Classifier, self).__init__(predictor=predictor) def __call__(self, x, t): y = self.predictor(x) loss = F.softmax_cross_entropy(y, t) accuracy = F.accuracy(y, t) chainer.report({‘loss’: loss, ‘accuracy’: accuracy}, observer=self) return loss 14
  • 15. MNIST Example 15 ・・・ Dataset and Iterators Updater and Trainer Extensions Launch training loop Model and Optimizer
  • 16. Note on Trainer  If your training workflow is very different from standard ones, you can still write your own training loop  We recommend you to use Trainer for newly-written training scripts – Most usages are covered by the Trainer – You can flexibly customize each component of Trainer 16
  • 17. We are planning the first major version up!  Planning to release it in this autumn (Oct. – Nov.)  It will breaks the backward compatibility Planned features  Separate CuPy into a separate repository/package  Plugin system and service (we need discussions with you!) (share Functions/Links/etc. easily with other users without sending PRs)  Backprop as a graph (or gradient of expressions including gradients)  Parameter shape inference (without specifying “input size”)  Make asynchronous CPU/GPU transfer by default  Parameter annotation 17