Init. Args: scale_factor (float): scaling mode (str): interpolation mode
(self, scale_factor, mode, align_corners=False)
| 213 | """ |
| 214 | |
| 215 | def __init__(self, scale_factor, mode, align_corners=False): |
| 216 | """Init. |
| 217 | |
| 218 | Args: |
| 219 | scale_factor (float): scaling |
| 220 | mode (str): interpolation mode |
| 221 | """ |
| 222 | super(Interpolate, self).__init__() |
| 223 | |
| 224 | self.interp = nn.functional.interpolate |
| 225 | self.scale_factor = scale_factor |
| 226 | self.mode = mode |
| 227 | self.align_corners = align_corners |
| 228 | |
| 229 | def forward(self, x): |
| 230 | """Forward pass. |