Init. Args: scale_factor (float): scaling mode (str): interpolation mode
(self, scale_factor, mode, align_corners=False)
| 122 | """ |
| 123 | |
| 124 | def __init__(self, scale_factor, mode, align_corners=False): |
| 125 | """Init. |
| 126 | |
| 127 | Args: |
| 128 | scale_factor (float): scaling |
| 129 | mode (str): interpolation mode |
| 130 | """ |
| 131 | super(Interpolate, self).__init__() |
| 132 | |
| 133 | self.interp = nn.functional.interpolate |
| 134 | self.scale_factor = scale_factor |
| 135 | self.mode = mode |
| 136 | self.align_corners = align_corners |
| 137 | |
| 138 | def forward(self, x): |
| 139 | """Forward pass. |