"git@developer.sourcefind.cn:OpenDAS/megatron-lm.git" did not exist on "09e05c6f7c8aa9df56591ee41771a646a5f43ddd"
Unverified Commit a055f6ad authored by Sherzodbek's avatar Sherzodbek Committed by GitHub
Browse files

Small bug in FreeAnchor head (#944)

* reduce 1e-12 to make difference between variables

If 1e-12 is used to make a difference between t1 and t2, then later (t2-t1) might become 0 as 1e-12 can't affect to the number (at least true in pytorch, verified in v1.5.0+).

* Revert "reduce 1e-12 to make difference between variables"

This reverts commit 33ec7215d22be59bf0012dea748f5cacc33a0fb8.

* reduce 1e-12 to make difference between variables

If 1e-12 is used to make a difference between t1 and t2, then later (t2-t1) might become 0 as 1e-12 can't affect to the number (at least true in pytorch, verified in v1.5.0+). Not sure whether 1e-7 or 1e-8 worked. But 1e-6 did.
parent b1deeb53
......@@ -120,7 +120,7 @@ class FreeAnchor3DHead(Anchor3DHead):
# object_box_prob: P{a_{j} -> b_{i}}, shape: [i, j]
t1 = self.bbox_thr
t2 = object_box_iou.max(
dim=1, keepdim=True).values.clamp(min=t1 + 1e-12)
dim=1, keepdim=True).values.clamp(min=t1 + 1e-6)
object_box_prob = ((object_box_iou - t1) / (t2 - t1)).clamp(
min=0, max=1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment