Mercurial > ift6266
diff datasets/ftfile.py @ 275:7b4507295eba
merge
author | Xavier Glorot <glorotxa@iro.umontreal.ca> |
---|---|
date | Mon, 22 Mar 2010 10:20:10 -0400 |
parents | a92ec9939e4f |
children | 5e481b224117 |
line wrap: on
line diff
--- a/datasets/ftfile.py Mon Mar 22 10:19:45 2010 -0400 +++ b/datasets/ftfile.py Mon Mar 22 10:20:10 2010 -0400 @@ -201,7 +201,9 @@ set. """ if valid_data is None: - total_valid_size = min(sum(FTFile(td).size for td in test_data), maxsize) + total_valid_size = sum(FTFile(td).size for td in test_data) + if maxsize is not None: + total_valid_size = min(total_valid_size, maxsize) valid_size = total_valid_size/len(train_data) self._train = FTData(train_data, train_lbl, size=-valid_size, inscale=inscale, outscale=outscale,