Pytorch-lightning: Gpus=1 + precision not working when using only certain layers

Created on 4 Nov 2020  路  3Comments  路  Source: PyTorchLightning/pytorch-lightning

馃悰 Bug

Making a finetuning model where the backbone isn't training breaks 16-bit.

3rd-party Priority P0 bug / fix help wanted

Most helpful comment

Hi! thanks for your contribution!, great first issue!

All 3 comments

Hi! thanks for your contribution!, great first issue!

Just to keep all the details here, this seems to be a side effect of amp. When we call self.trainer.scaler.step(optimizer) internally the scaler does an inf check on the optimizer's parameters, which is the assertion being thrown. This check needs to coincide with ensuring that the parameters are even updated within this step.

@SeanNaren follow up with pytorch team

Was this page helpful?
0 / 5 - 0 ratings

Related issues

justusschock picture justusschock  路  3Comments

edenlightning picture edenlightning  路  3Comments

Vichoko picture Vichoko  路  3Comments

chuong98 picture chuong98  路  3Comments

mmsamiei picture mmsamiei  路  3Comments