SlideShare a Scribd company logo
1 of 25
Download to read offline
機械学習
フレームワーク横断
Chainer, Keras
【基礎編】
目次
• 問題設定
• chainer導入と実装
• keras導入と実装
• chainer keras比較
• 感想
問題設定
(分類問題について)
分類問題の流れ
対
象
物
特
徴
量
分
類
器
A
C
B
• 対象物から問題に適した特徴量を抽出
• 特徴量を分類器に入力
• 対象物がどのクラスに属しているか判定
今回扱うデータ
対
象
物
特
徴
量
分
類
器
A
C
B
アヤメ
setosa
virginica
versicolor
特徴量の内容
対
象
物
特
徴
量
分
類
器
A
C
B
花びらの長さと幅
がく片の長さと幅
の4次元ベクトル
扱う分類器
対
象
物
特
徴
量
分
類
器
A
C
B
NN(ニューラルネットワーク)
今回の構成
花びらの長さ
花びらの幅
(中間層の1つ目のノードの入出力のみに着目)
がく片の幅
がく片の長さ
b(バイアス)
入力層
中間層
出力層
W1
W2
W1
W2
教師信号の内要
[1, 0, 0]
[0, 1, 0]
[0, 0, 1]
Chainerの導入と実装
http://chainer.org/
Chainer 導入
Chainer実装
Chainer実装
モデルの記述
Chainer実装 モデルの記述
Chainer実装
モデル、最適化
手法の設定
Chainer実装
学習
参考図書
『Chainerによる実践深層学習』新納 浩幸
http://shop.ohmsha.co.jp/shopdetail/000000004728/
Kerasの導入と実装
https://keras.io/ja/
Keras導入
Keras実装
モデルの記述
損失関数、最適化
手法を設定して
コンパイル
バッチ数、繰り返し
回数を設定して学習
Chainer Keras比較
実行結果 Chainer
実行結果 Keras
実行結果 比較
• 識別制度がChainer:66.67% Keras:69.33%と似
たような結果に
• 出力結果を見比べてみると、正解クラスが1のとこ
ろを0と識別ミスしている => まだまだチューニン
グが必要そう
今回はたまたま同じような結果になったが、ランダムに決まる更新アルゴリズムの
初期値によってはパラメタータの値が変わってくるので必ずしも一致するとは限らない。
感想
• Chainer:変数の中身を見ながら実装する中で、細
かい理論の理解もしながら進められた。(参考文献
が良かった)
• Keras:NNの実装イメージがついている前提で触る
と、とてもシンプルでチューニングしやすかった

More Related Content

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 

Featured (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

機械学習フレームワーク横断、Chainer, Keras