# Hard negative mining for every class?

**URL:** <https://discuss.pytorch.org/t/hard-negative-mining-for-every-class/100496>\
**Category:** Uncategorized\
**Created:** [October 24, 2020, 3:31pm UTC](https://discuss.pytorch.org/t/hard-negative-mining-for-every-class/100496 "2020-10-24T15:31:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![YASJAY](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/yasjay/32/12858_2.png) [@YASJAY](https://discuss.pytorch.org/u/YASJAY)\
**Post date:** [October 24, 2020, 3:31pm UTC](https://discuss.pytorch.org/t/hard-negative-mining-for-every-class/100496/1 "2020-10-24T15:31:37Z")

</div>

Hi,

If anyone has experience in experimenting with hard negative mining in say object detection, I need some insight on its implementation:

1. Should it be applied on background only?
2. Can it be applied on every object class? If yes, how do we decide the top-k threshold for every epoch?
