mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-10 12:21:57 +08:00
rename variables nb -> num (#567)
* rename nb -> num * flake8 * batch_nb, epoch_nb, gpu_nb, split_nb * add _num deprecations
This commit is contained in:
committed by
William Falcon
parent
63717e8fda
commit
3a58937d8b
@@ -121,7 +121,7 @@ class LightningTestModelBase(LightningModule):
|
||||
loss_val = loss_val.unsqueeze(0)
|
||||
|
||||
# alternate possible outputs to test
|
||||
if self.trainer.batch_nb % 1 == 0:
|
||||
if self.trainer.batch_idx % 1 == 0:
|
||||
output = OrderedDict({
|
||||
'loss': loss_val,
|
||||
'progress_bar': {'some_val': loss_val * loss_val},
|
||||
@@ -129,7 +129,7 @@ class LightningTestModelBase(LightningModule):
|
||||
})
|
||||
|
||||
return output
|
||||
if self.trainer.batch_nb % 2 == 0:
|
||||
if self.trainer.batch_idx % 2 == 0:
|
||||
return loss_val
|
||||
|
||||
# ---------------------
|
||||
|
||||
Reference in New Issue
Block a user