question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The margin and distance type in your implementation

See original GitHub issue

Thanks 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: image 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:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
JosephKJcommented, May 23, 2021

Its a writing and variable name issue. It will not affect the results.

0reactions
1170300714commented, Apr 4, 2022

收到,感谢您的来件

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found