(x, eps=1e-5)
| 24 | |
| 25 | |
| 26 | def 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 | |
| 33 | def gen_encoder_output_proposals(memory:Tensor, memory_padding_mask:Tensor, spatial_shapes:Tensor): |
no outgoing calls
no test coverage detected