Added caching to image sizes so we dont do it every time.

This commit is contained in:
Jaret Burkett
2024-07-15 19:07:41 -06:00
parent e4558dff4b
commit 58dffd43a8
7 changed files with 90 additions and 34 deletions

View File

@@ -187,7 +187,7 @@ for epoch in range(args.epochs):
batch: 'DataLoaderBatchDTO'
img_batch = batch.tensor
img_batch = color_block_imgs(img_batch, neg1_1=True)
# img_batch = color_block_imgs(img_batch, neg1_1=True)
chunks = torch.chunk(img_batch, batch_size, dim=0)
# put them so they are size by side
@@ -208,9 +208,9 @@ for epoch in range(args.epochs):
# convert to image
img = transforms.ToPILImage()(big_img)
show_img(img)
# show_img(img)
time.sleep(1.0)
# time.sleep(1.0)
# if not last epoch
if epoch < args.epochs - 1:
trigger_dataloader_setup_epoch(dataloader)