SlideShare a Scribd company logo
1 of 12
Capsnet
Yi-Fan Liou
Remarks
• The neurons should be clustered based on specific pattern
• Capsules – the neuron groups
• Comparing to many methods focus on “filter grouping”, Capsnet focus on the feature
maps.
• This would be thought like the “filter grouping” because the feature maps are
generated from the filters.
• The activation function should control the information flows
• Dynamic routing – the information flow should flow to the function which can keep
their original information the most.
• The activation is happened before the information flow into the neurons
• Max pooling is not specific. So the “attention like” function would be helpful
• https://math.stackexchange.com/questions/689022/how-does-the-dot-product-
determine-similarity
Basic and special definitions
input
Channel
number
Capsule
number
Basic Capsule concept
Feature
map
Feature
map
Feature
map
Feature
map
capsule
Input
Capsule
1
Capsule
2
Capsule
3
Capsule
n
…
Kernel
groups 1
Kernel
groups 2
Kernel
groups 3
Kernel
groups n
Capsule
1
Capsule
2
Capsule
3
Capsule
m
…
Kernel
groups
The activation function – dynamic routine
Input
Capsule
1
Capsule
2
Capsule
3
Capsule
n
…
Kernel
groups 1
Kernel
groups 2
Kernel
groups 3
Kernel
groups n
Capsule
1
Capsule
2
Capsule
3
Capsule
m
…
C
The dynamic routine contains 2 concepts
1. Agreements
1. Consider as pooling
2. Activation
1. An attention like
How to activate the capsules
Capsule
(u)
Capsule
(v)
W
filters
Capsule
(u)
Capsule
(û̂̂̂)
The shape of
û is the same
as v
Step 1.
Step 2.
Capsule
(û̂̂̂1)
Capsule
(û̂̂̂2)
Capsule
(û̂̂̂3)
Capsule
(S)
c +c +c
Step 3. squashing
unitscale
Capsule
(S)
Capsule
(v)
squashing
Capsule
(u)
Capsule
(u)
W
C
The coupling coefficient - C
Capsule
(û̂̂̂1)
Capsule
(û̂̂̂2)
Capsule
(û̂̂̂3)
Capsule
(S)c +c +c Capsule
(v)
squashing
Capsule
(û̂̂̂)
Capsule
(u)
W
…...
Similarity (agreement)
• Once you update C, the
v will be changed
• You can re-calculate the
v and get a new C
• In the original paper,
this step will run 3 times
1. In the first step, the v is merged from all capsules. If the all the capsules give
a result that the output will similar to certain capsule, we can just activate
that capsule.
2. This will control the information flow.
• If the information is handles with some filters that are not correlated,
this would generated noise.
The DigitCaps
Capsule
(v)
Capsule
(v)
Capsule
(v)
Capsule
(v)
86
6
W1,
(8 X 16)
* 16
W10,
(8 X 16)
16
…
*
Repeat 3 times for 3 capsules (in original paper, this should be repeated 32 times)
X C
Repeat 6*6 times
capsule
Comparing to normal neural network
activation
scalar vector
Cactivation
Weighted sum
Squashing
Accept all the
information
from previous
layer
Choose one
information
from previous
layer
The simple architecture
Give the meaning to the DigitCaps
• Originally, the 10 vectors in
DigitCaps would not mean anything
• The study use the DigitCaps to
reconstruct the MNIST picture.
• For example, if the original
picture is 5, the other capsules
are masked and only keep the
specific capsule.
• The kept capsule is used for
reconstructing the picture. The
reconstructing results are also
used for regularization.
Capsnet

More Related Content

Similar to Capsnet

CSA 3702 machine learning module 3
CSA 3702 machine learning module 3CSA 3702 machine learning module 3
CSA 3702 machine learning module 3
Nandhini S
 
A principled way to principal components analysis
A principled way to principal components analysisA principled way to principal components analysis
A principled way to principal components analysis
SERC at Carleton College
 
PR-197: One ticket to win them all: generalizing lottery ticket initializatio...
PR-197: One ticket to win them all: generalizing lottery ticket initializatio...PR-197: One ticket to win them all: generalizing lottery ticket initializatio...
PR-197: One ticket to win them all: generalizing lottery ticket initializatio...
Jinwon Lee
 
The Introduction to Neural Networks.ppt
The Introduction to Neural Networks.pptThe Introduction to Neural Networks.ppt
The Introduction to Neural Networks.ppt
moh2020
 

Similar to Capsnet (20)

Artificial Neural Network.pptx
Artificial Neural Network.pptxArtificial Neural Network.pptx
Artificial Neural Network.pptx
 
A Scaleable Implemenation of Deep Leaning on Spark- Alexander Ulanov
A Scaleable Implemenation of Deep Leaning on Spark- Alexander UlanovA Scaleable Implemenation of Deep Leaning on Spark- Alexander Ulanov
A Scaleable Implemenation of Deep Leaning on Spark- Alexander Ulanov
 
A Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
A Scaleable Implementation of Deep Learning on Spark -Alexander UlanovA Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
A Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
 
Fundamental, An Introduction to Neural Networks
Fundamental, An Introduction to Neural NetworksFundamental, An Introduction to Neural Networks
Fundamental, An Introduction to Neural Networks
 
Artificial Neural Network seminar presentation using ppt.
Artificial Neural Network seminar presentation using ppt.Artificial Neural Network seminar presentation using ppt.
Artificial Neural Network seminar presentation using ppt.
 
lecture2.pdf
lecture2.pdflecture2.pdf
lecture2.pdf
 
machine learning - Clustering in R
machine learning - Clustering in Rmachine learning - Clustering in R
machine learning - Clustering in R
 
AI Class Topic 6: Easy Way to Learn Deep Learning AI Technologies
AI Class Topic 6: Easy Way to Learn Deep Learning AI TechnologiesAI Class Topic 6: Easy Way to Learn Deep Learning AI Technologies
AI Class Topic 6: Easy Way to Learn Deep Learning AI Technologies
 
Hand Written Digit Classification
Hand Written Digit ClassificationHand Written Digit Classification
Hand Written Digit Classification
 
ML Module 3 Non Linear Learning.pptx
ML Module 3 Non Linear Learning.pptxML Module 3 Non Linear Learning.pptx
ML Module 3 Non Linear Learning.pptx
 
1710.09829v2.pdf
1710.09829v2.pdf1710.09829v2.pdf
1710.09829v2.pdf
 
CSA 3702 machine learning module 3
CSA 3702 machine learning module 3CSA 3702 machine learning module 3
CSA 3702 machine learning module 3
 
Dynamic Routing Between Capsules
Dynamic Routing Between CapsulesDynamic Routing Between Capsules
Dynamic Routing Between Capsules
 
Hands on machine learning with scikit-learn and tensor flow by ahmed yousry
Hands on machine learning with scikit-learn and tensor flow by ahmed yousryHands on machine learning with scikit-learn and tensor flow by ahmed yousry
Hands on machine learning with scikit-learn and tensor flow by ahmed yousry
 
A principled way to principal components analysis
A principled way to principal components analysisA principled way to principal components analysis
A principled way to principal components analysis
 
230727_HB_JointJournalClub.pptx
230727_HB_JointJournalClub.pptx230727_HB_JointJournalClub.pptx
230727_HB_JointJournalClub.pptx
 
02 Fundamental Concepts of ANN
02 Fundamental Concepts of ANN02 Fundamental Concepts of ANN
02 Fundamental Concepts of ANN
 
PR-197: One ticket to win them all: generalizing lottery ticket initializatio...
PR-197: One ticket to win them all: generalizing lottery ticket initializatio...PR-197: One ticket to win them all: generalizing lottery ticket initializatio...
PR-197: One ticket to win them all: generalizing lottery ticket initializatio...
 
Waste Classification System using Convolutional Neural Networks.pptx
Waste Classification System using Convolutional Neural Networks.pptxWaste Classification System using Convolutional Neural Networks.pptx
Waste Classification System using Convolutional Neural Networks.pptx
 
The Introduction to Neural Networks.ppt
The Introduction to Neural Networks.pptThe Introduction to Neural Networks.ppt
The Introduction to Neural Networks.ppt
 

Recently uploaded

bams-3rd-case-presentation-scabies-12-05-2020.pptx
bams-3rd-case-presentation-scabies-12-05-2020.pptxbams-3rd-case-presentation-scabies-12-05-2020.pptx
bams-3rd-case-presentation-scabies-12-05-2020.pptx
JocylDuran
 
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
q6pzkpark
 
Abortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Doha {{ QATAR }} +966572737505) Get CytotecAbortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di Bontang
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di  Bontangobat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di  Bontang
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di Bontang
siskavia95
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Klinik kandungan
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
wsppdmt
 
Audience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxAudience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptx
Stephen266013
 
Client Researchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.pptx
Client Researchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.pptxClient Researchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.pptx
Client Researchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.pptx
Stephen266013
 
Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...
varanasisatyanvesh
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
ahmedjiabur940
 
sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444
saurabvyas476
 
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
acoha1
 

Recently uploaded (20)

bams-3rd-case-presentation-scabies-12-05-2020.pptx
bams-3rd-case-presentation-scabies-12-05-2020.pptxbams-3rd-case-presentation-scabies-12-05-2020.pptx
bams-3rd-case-presentation-scabies-12-05-2020.pptx
 
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024
 
Abortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Doha {{ QATAR }} +966572737505) Get CytotecAbortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
Abortion pills in Doha {{ QATAR }} +966572737505) Get Cytotec
 
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
 
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di Bontang
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di  Bontangobat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di  Bontang
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di Bontang
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
Solution manual for managerial accounting 8th edition by john wild ken shaw b...
Solution manual for managerial accounting 8th edition by john wild ken shaw b...Solution manual for managerial accounting 8th edition by john wild ken shaw b...
Solution manual for managerial accounting 8th edition by john wild ken shaw b...
 
Introduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptxIntroduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptx
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
 
Audience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxAudience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptx
 
Client Researchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.pptx
Client Researchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.pptxClient Researchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.pptx
Client Researchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.pptx
 
How to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data AnalyticsHow to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data Analytics
 
Predictive Precipitation: Advanced Rain Forecasting Techniques
Predictive Precipitation: Advanced Rain Forecasting TechniquesPredictive Precipitation: Advanced Rain Forecasting Techniques
Predictive Precipitation: Advanced Rain Forecasting Techniques
 
Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444
 
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
 
社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
 

Capsnet

  • 2. Remarks • The neurons should be clustered based on specific pattern • Capsules – the neuron groups • Comparing to many methods focus on “filter grouping”, Capsnet focus on the feature maps. • This would be thought like the “filter grouping” because the feature maps are generated from the filters. • The activation function should control the information flows • Dynamic routing – the information flow should flow to the function which can keep their original information the most. • The activation is happened before the information flow into the neurons • Max pooling is not specific. So the “attention like” function would be helpful • https://math.stackexchange.com/questions/689022/how-does-the-dot-product- determine-similarity
  • 3. Basic and special definitions input Channel number Capsule number
  • 4. Basic Capsule concept Feature map Feature map Feature map Feature map capsule Input Capsule 1 Capsule 2 Capsule 3 Capsule n … Kernel groups 1 Kernel groups 2 Kernel groups 3 Kernel groups n Capsule 1 Capsule 2 Capsule 3 Capsule m … Kernel groups
  • 5. The activation function – dynamic routine Input Capsule 1 Capsule 2 Capsule 3 Capsule n … Kernel groups 1 Kernel groups 2 Kernel groups 3 Kernel groups n Capsule 1 Capsule 2 Capsule 3 Capsule m … C The dynamic routine contains 2 concepts 1. Agreements 1. Consider as pooling 2. Activation 1. An attention like
  • 6. How to activate the capsules Capsule (u) Capsule (v) W filters Capsule (u) Capsule (û̂̂̂) The shape of û is the same as v Step 1. Step 2. Capsule (û̂̂̂1) Capsule (û̂̂̂2) Capsule (û̂̂̂3) Capsule (S) c +c +c Step 3. squashing unitscale Capsule (S) Capsule (v) squashing Capsule (u) Capsule (u) W C
  • 7. The coupling coefficient - C Capsule (û̂̂̂1) Capsule (û̂̂̂2) Capsule (û̂̂̂3) Capsule (S)c +c +c Capsule (v) squashing Capsule (û̂̂̂) Capsule (u) W …... Similarity (agreement) • Once you update C, the v will be changed • You can re-calculate the v and get a new C • In the original paper, this step will run 3 times 1. In the first step, the v is merged from all capsules. If the all the capsules give a result that the output will similar to certain capsule, we can just activate that capsule. 2. This will control the information flow. • If the information is handles with some filters that are not correlated, this would generated noise.
  • 8. The DigitCaps Capsule (v) Capsule (v) Capsule (v) Capsule (v) 86 6 W1, (8 X 16) * 16 W10, (8 X 16) 16 … * Repeat 3 times for 3 capsules (in original paper, this should be repeated 32 times) X C Repeat 6*6 times capsule
  • 9. Comparing to normal neural network activation scalar vector Cactivation Weighted sum Squashing Accept all the information from previous layer Choose one information from previous layer
  • 11. Give the meaning to the DigitCaps • Originally, the 10 vectors in DigitCaps would not mean anything • The study use the DigitCaps to reconstruct the MNIST picture. • For example, if the original picture is 5, the other capsules are masked and only keep the specific capsule. • The kept capsule is used for reconstructing the picture. The reconstructing results are also used for regularization.