MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / inverse_sigmoid

Function inverse_sigmoid

semantic_sam/body/decoder/utils/utils.py:26–30  ·  view source on GitHub ↗
(x, eps=1e-5)

Source from the content-addressed store, hash-verified

24
25
26def inverse_sigmoid(x, eps=1e-5):
27 x = x.clamp(min=0, max=1)
28 x1 = x.clamp(min=eps)
29 x2 = (1 - x).clamp(min=eps)
30 return torch.log(x1/x2)
31
32
33def gen_encoder_output_proposals(memory:Tensor, memory_padding_mask:Tensor, spatial_shapes:Tensor):

Callers 5

prepare_for_dnMethod · 0.85
prepare_for_dn_moMethod · 0.85
pred_boxMethod · 0.85
forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected