(self)
| 252 | self.scaler = torch.cuda.amp.GradScaler() |
| 253 | |
| 254 | def context(self): |
| 255 | return torch.cuda.amp.autocast() if self.activated else NullContextManager() |
| 256 | |
| 257 | def backward(self, loss): |
| 258 | if self.activated: |
nothing calls this directly
no test coverage detected