Comments (6)
From the paper, section 4, last paragraph, you have that
Our implementation [...] minimize the sum of the margin losses in Eq. 4.
(Install this extension to view LaTeX on GitHub.)
So, as you can see, you're supposed to use classes = (x ** 2).sum(dim=-1) ** 0.5
.
from capsule-networks.
- That's why I put there the link to the wrong line.
- The point is not that "there is no need" but "it's plain wrong".
- Okay, let me see.
from capsule-networks.
Though each capsules norm is a probability [0-1], the capsules will be fighting within themselves to send the info to higher level capsules (based on their correlation with the output of the higher level capsules). Hence, there is a softmax layer.
from capsule-networks.
That's not how Capsules work...
from capsule-networks.
Maybe if you could write your understanding about capsules or point out the lines in the paper, it will be helpful to discuss and learn I guess. Anyway, I will let the code owner to clarify your doubts.
In my understanding, more the correlation between primary capsule's output to digit capsule's output, the higher the bond between them. Hence, it's a kind of attention mechanism between primary capsules and digit capsules, which necessitates the need for a softmax (based on correlation).
from capsule-networks.
Oh I see. My bad. I didn't see which softmax you are mentioning:)
I think you are right. There is no need for softmax (since the vector's magnitude emulates probability). Thanks for elaborating it.
By the way, I have noticed some more deviations in the implementation with respect to paper. Please check if you find time. I'm not sure if my interpretation is correct.
from capsule-networks.
Related Issues (20)
- Syntax error: invalid syntax on line 65 HOT 1
- AttributeError: module 'torch.sparse' has no attribute 'torch' HOT 1
- Just a quick question on the dynamic routing's similarity measurment HOT 1
- Why dim=2 here? I guess the softmax is taken over all capsules in the layer above, so shouldn't that be dim=0? HOT 4
- Deviations of this implementation from the original paper HOT 4
- How should I set num_route_nodes? HOT 2
- Can it support pytorch version 0.4 or latest?
- How to replace dataset and change dimensions HOT 1
- RuntimeError: The size of tensor a (16) must match the size of tensor b (10) at non-singleton dimension 1 HOT 1
- Can the 8 32-channel conv be replaced with a single 256-channel conv in PrimaryCapsule? HOT 1
- MLP Capsules ? HOT 1
- the visdom window has nothing to show HOT 1
- Squash function HOT 1
- Try my implementation HOT 1
- @ operator HOT 2
- No such file or directory
- Detach() in route?
- How to prove it is a real capsule network?
- What are the core code of capsule network?
- RuntimeError: Input type (torch.cuda.ByteTensor) and weight type (torch.cuda.FloatTensor) should be the same
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capsule-networks.