Fix bfloat16 support for nearest neighbor interpolation.
(self, x)
| 61 | class Upsample(nn.Upsample): |
| 62 | |
| 63 | def forward(self, x): |
| 64 | """ |
| 65 | Fix bfloat16 support for nearest neighbor interpolation. |
| 66 | """ |
| 67 | return super().forward(x.float()).type_as(x) |
| 68 | |
| 69 | |
| 70 | class Resample(nn.Module): |