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