Coder Social home page Coder Social logo

Possible bug? about ssd.pytorch HOT 2 CLOSED

amdegroot avatar amdegroot commented on July 30, 2024
Possible bug?

from ssd.pytorch.

Comments (2)

amdegroot avatar amdegroot commented on July 30, 2024 5

No, so basically what's going on here is we take the indices that the descending sorted values held before they were sorted and
tensor a = [20,10,80,40,70,30,]
lets say after removing positive index values(setting pos. vals to 0) it's now:
tensor a = [20,10,0,40,0,30]
_, loss_idx = a.sort(1, descending=True) # --> disregard [40,30,20,10,0,0]
--> loss_idx is now [3,5,0,1,2,4]

_, idx_rank = [3,5,0,1,2,4] .sort(1) # --> disregard [0,1,2,3,4,5] --> idx_rank is now [2,3,4,0,5,1]

Comparing idx_rank with tensor a we see that idx_rank is simply the rank assigned to each corresponding value in tensor a with the highest ranking value being the highest valued negative (Hence hard negative mining). The reason we sort with descending=True is because we want to sort in terms of our confidence of the negative instances' losses.

from ssd.pytorch.

dgmadalin avatar dgmadalin commented on July 30, 2024

Hi,
I was wondering why you need to compare the posIdx and negIdx to 0 when filtering the predictions / targets:
(pos_idx+neg_idx).gt(0)

from ssd.pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.