The margin and distance type in your implementation
See original GitHub issueThanks for your greate job!
I found that the hyper-parameter ‘margin’ and the ‘distance type’ in your code is the opposite of your paper report:
In your code:(detectron2/modeling/roi_heads/fast_rcnn.py/FastRCNNOutputLayers)
self.hingeloss = nn.HingeEmbeddingLoss(2)
means the margin is 2.
distances = torch.cdist(fg_features, torch.stack(all_means).cuda(), p=self.margin)
where in your code the p(self.margin) is 10, which means a 10-Norm
But in your papar:
You said that the distance is Euclidean distance so the p is should be 2 and the margin should be 10.
I suspect you are writing the reverse Looking forward to your apply.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:6 (2 by maintainers)
Top Results From Across the Web
margin - CSS: Cascading Style Sheets - MDN Web Docs
Syntax. The margin property may be specified using one, two, three, or four values. Each value is a <length> , a <percentage> ,...
Read more >An Idiot's guide to Support vector machines (SVMs)
Margin of Separation (d): the separation between the hyperplane and the closest data point for a given weight vector w and bias b....
Read more >Implementing Support Vector Machine From Scratch
Implementing a machine learning algorithm from scratch forces us to ... Understanding the maximal margin classifier with gradient descent ...
Read more >Losses - PyTorch Metric Learning
In the above equation, m = radians(margin) . The paper uses 0.5 radians, which is 28.6 degrees. num_classes: The number of classes in...
Read more >Padding vs. Margin: Key Differences and When to Use Them
In web development and design, the margin of an element represents the outside space of the element itself, while the padding represents the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Its a writing and variable name issue. It will not affect the results.
收到,感谢您的来件