(self, mode="bilinear", align_corners=False)
| 709 | """ |
| 710 | |
| 711 | def __init__(self, mode="bilinear", align_corners=False): |
| 712 | super().__init__() |
| 713 | assert mode in ["bilinear", "nearest"] |
| 714 | self.custom_func = custom.cropandpad_forward( |
| 715 | mode=mode, align_corners=align_corners |
| 716 | ) |
| 717 | |
| 718 | def forward(self, inp: Tensor, percent: Tensor, pad_val: Tensor = None) -> Tensor: |
| 719 | if pad_val is None: |