(tensor_list)
| 332 | return torch.clamp(mn, min=0) |
| 333 | |
| 334 | def max_(tensor_list): |
| 335 | # return the element-wise max of the tensor list. |
| 336 | x = torch.stack(tensor_list) |
| 337 | mx = x.max(axis=0)[0] |
| 338 | return torch.clamp(mx, max=1) |
| 339 | |
| 340 | # From https://github.com/Jamy-L/Pytorch-Contrast-Adaptive-Sharpening/ |
| 341 | def contrast_adaptive_sharpening(image, amount): |
no outgoing calls
no test coverage detected