Skip to content

Commit 6da6074

Browse files
committed
loop timing
1 parent ebbe704 commit 6da6074

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

labml_nn/gan/cycle_gan.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def run(self):
493493
# Loop through epochs
494494
for epoch in monit.loop(self.epochs):
495495
# Loop through the dataset
496-
for i, batch in enumerate(self.dataloader):
496+
for i, batch in monit.enum('Train', self.dataloader):
497497
# Move images to the device
498498
data_x, data_y = batch['x'].to(self.device), batch['y'].to(self.device)
499499

@@ -528,6 +528,8 @@ def run(self):
528528
# Update learning rates
529529
self.generator_lr_scheduler.step()
530530
self.discriminator_lr_scheduler.step()
531+
# New line
532+
tracker.new_line()
531533

532534
def optimize_generators(self, data_x: torch.Tensor, data_y: torch.Tensor, true_labels: torch.Tensor):
533535
"""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name='labml-nn',
8-
version='0.4.80',
8+
version='0.4.81',
99
author="Varuna Jayasiri, Nipun Wijerathne",
1010
1111
description="A collection of PyTorch implementations of neural network architectures and layers.",

0 commit comments

Comments
 (0)