Fix bfloat16 support for nearest neighbor interpolation.
(self, x)
| 74 | class Upsample(nn.Upsample): |
| 75 | |
| 76 | def forward(self, x): |
| 77 | """ |
| 78 | Fix bfloat16 support for nearest neighbor interpolation. |
| 79 | """ |
| 80 | return super().forward(x.float()).type_as(x) |
| 81 | |
| 82 | |
| 83 | class Resample(nn.Module): |