How to implement CapsNets using TensorFlow

Опубликовано: 27 Март 2026
на канале: Aurélien Géron
56,908
1.3k

This video will show you how to implement a Capsule Network in TensorFlow. You will learn more about CapsNets, as well as tips & tricks on using TensorFlow more efficiently. Hope you like it!

Subscribe for more Machine Learning and Deep Learning videos.

Jupyter Notebook:
Project: https://github.com/ageron/handson-ml
The notebook is called extra_capsnets.ipynb

My introduction to CapsNets video:
   • Capsule Networks (CapsNets) – Tutorial  

NIPS 2017 Paper:
Dynamic Routing Between Capsules,
by Sara Sabour, Nicholas Frosst, Geoffrey E. Hinton
https://arxiv.org/abs/1710.09829

The 2011 paper:
Transforming Autoencoders
by Geoffrey E. Hinton, Alex Krizhevsky and Sida D. Wang
https://goo.gl/ARSWM6

Other CapsNet implementations:
Keras w/ TensorFlow backend: https://github.com/XifengGuo/CapsNet-...
TensorFlow: https://github.com/naturomics/CapsNet...
PyTorch: https://github.com/gram-ai/capsule-ne...

Book:
Hands-On Machine with Scikit-Learn and TensorFlow, O'Reilly, 2017
English: https://goo.gl/IoWYKD
German: https://goo.gl/Z5C9FT
French, part 1: https://goo.gl/CXfaP7
French, part 2: https://goo.gl/vrAiX4

Github: https://github.com/ageron
Twitter:   / aureliengeron  

Slides:
https://www.slideshare.net/aurelienge...

Errata:
At 21:53, the margin loss should have a + sign before the λ, not a – sign.