mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
added debugging util
This commit is contained in:
@@ -150,6 +150,16 @@ class Trainer(TrainerIO):
|
||||
self.use_ddp = False
|
||||
self.use_dp = False
|
||||
|
||||
# training bookeeping
|
||||
self.total_batch_nb = 0
|
||||
self.running_loss = []
|
||||
self.avg_loss = 0
|
||||
self.batch_nb = 0
|
||||
self.tqdm_metrics = {}
|
||||
self.nb_val_batches = None
|
||||
self.nb_tng_batches = None
|
||||
self.nb_test_batches = None
|
||||
|
||||
# gpus come in as a string.
|
||||
# if gpus = -1 then use all available devices
|
||||
# otherwise, split the string using commas
|
||||
@@ -273,12 +283,6 @@ class Trainer(TrainerIO):
|
||||
return self.__tng_tqdm_dic
|
||||
|
||||
def __layout_bookeeping(self):
|
||||
# training bookeeping
|
||||
self.total_batch_nb = 0
|
||||
self.running_loss = []
|
||||
self.avg_loss = 0
|
||||
self.batch_nb = 0
|
||||
self.tqdm_metrics = {}
|
||||
|
||||
# determine number of training batches
|
||||
self.nb_tng_batches = len(self.tng_dataloader)
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ def main():
|
||||
progress_bar=False,
|
||||
experiment=get_exp(),
|
||||
max_nb_epochs=1,
|
||||
train_percent_check=1.0,
|
||||
train_percent_check=0.4,
|
||||
val_percent_check=0.4,
|
||||
gpus=[0, 1],
|
||||
distributed_backend='ddp',
|
||||
|
||||
Reference in New Issue
Block a user