Created
January 5, 2017 14:02
-
-
Save szagoruyko/3747cf010f2bbcd0da2219dfc111f53c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 3948543212d3d8286a687ef7783783bae720f65f | |
Author: Sergey Zagoruyko <zagoruyko2@gmail.com> | |
Date: Mon Nov 21 18:01:56 2016 +0100 | |
do gc only on val | |
diff --git a/dataloader.lua b/dataloader.lua | |
index a995bff..b69482a 100644 | |
--- a/dataloader.lua | |
+++ b/dataloader.lua | |
@@ -79,7 +79,9 @@ function DataLoader:run() | |
batch[i]:copy(input) | |
target[i] = sample.target | |
end | |
- collectgarbage() | |
+ if _G.dataset.split == 'val' then | |
+ collectgarbage() | |
+ end | |
return { | |
input = batch:view(sz * nCrops, table.unpack(imageSize)), | |
target = target, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment