(x: torch.Tensor, min, max)
| 14 | return (x.round() - x).detach() + x |
| 15 | |
| 16 | def clamp_ste(x: torch.Tensor, min, max): |
| 17 | return (x.clamp(min,max) - x).detach() + x |
| 18 | |
| 19 | def clamp_ste(x: torch.Tensor, min, max): |
| 20 | return (x.clamp(min,max) - x).detach() + x |