(self, x)
| 1288 | self.mod = mod |
| 1289 | |
| 1290 | def forward(self, x): |
| 1291 | dtype = x.dtype |
| 1292 | with torch.autocast("cuda", enabled=False): |
| 1293 | ret = self.mod.forward(x.to(torch.float32)).to(dtype) |
| 1294 | return ret |
| 1295 | |
| 1296 | |
| 1297 | class CastToFloatAll(torch.nn.Module): |