Skip to content

Commit fb2ecb6

Browse files
committed
capsule net descriptions
1 parent 642c944 commit fb2ecb6

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

labml_nn/capsule_networks/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
---
33
title: Capsule Networks
44
summary: >
5-
PyTorch implementation/tutorial of Capsule Networks.
5+
PyTorch implementation and tutorial of Capsule Networks.
66
Capsule networks is neural network architecture that embeds features
77
as capsules and routes them with a voting mechanism to next layer of capsules.
88
---
99
1010
# Capsule Networks
1111
12-
This is an implementation of [Dynamic Routing Between Capsules](https://arxiv.org/abs/1710.09829).
12+
This is a PyTorch implementation and tutorial of [Dynamic Routing Between Capsules](https://arxiv.org/abs/1710.09829).
1313
14-
Capsule networks is neural network architecture that embeds features as capsules and routes them
15-
with a voting mechanism to next layer of capsules.
14+
Capsule networks is neural network architecture that embeds features
15+
as capsules and routes them with a voting mechanism to next layer of capsules.
1616
1717
Unlike in other implementations of models, we've included a sample, because
1818
it is difficult to understand some of the concepts with just the modules.

labml_nn/capsule_networks/mnist.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
77
# Classify MNIST digits with Capsule Networks
88
9+
This is an annotated PyTorch code to classify MNIST digits with PyTorch.
10+
911
This paper implements the experiment described in paper
1012
[Dynamic Routing Between Capsules](https://arxiv.org/abs/1710.09829).
1113
"""
@@ -161,11 +163,13 @@ def main():
161163
"""
162164
Run the experiment
163165
"""
164-
conf = Configs()
165166
experiment.create(name='capsule_network_mnist')
167+
conf = Configs()
166168
experiment.configs(conf, {'optimizer.optimizer': 'Adam',
167-
'optimizer.learning_rate': 1e-3,
168-
'device.cuda_device': 1})
169+
'optimizer.learning_rate': 1e-3})
170+
171+
experiment.add_pytorch_models({'model': conf.model})
172+
169173
with experiment.start():
170174
conf.run()
171175

0 commit comments

Comments
 (0)