(x, eps=1e-3)
| 652 | |
| 653 | |
| 654 | def inverse_sigmoid(x, eps=1e-3): |
| 655 | x = x.clamp(min=0, max=1) |
| 656 | x1 = x.clamp(min=eps) |
| 657 | x2 = (1 - x).clamp(min=eps) |
| 658 | return torch.log(x1 / x2) |
| 659 | |
| 660 | |
| 661 | def clean_state_dict(state_dict): |
no outgoing calls
no test coverage detected