Mercurial > ift6266
changeset 271:a92ec9939e4f
fixed a problem with maxsize when not provided
author | Yoshua Bengio <bengioy@iro.umontreal.ca> |
---|---|
date | Sun, 21 Mar 2010 19:30:05 -0400 |
parents | d41fe003fade |
children | f6d9b6b89c2a |
files | baseline/log_reg/log_reg.py datasets/ftfile.py |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/baseline/log_reg/log_reg.py Sat Mar 20 15:49:55 2010 -0400 +++ b/baseline/log_reg/log_reg.py Sun Mar 21 19:30:05 2010 -0400 @@ -142,7 +142,7 @@ #-------------------------------------------------------------------------------------------------------------------- def log_reg( learning_rate = 0.13, nb_max_examples =1000000, batch_size = 50, \ - dataset=datasets.nist_digits, image_size = 32 * 32, nb_class = 10, \ + dataset=datasets.nist_digits(), image_size = 32 * 32, nb_class = 10, \ patience = 5000, patience_increase = 2, improvement_threshold = 0.995): #28 * 28 = 784
--- a/datasets/ftfile.py Sat Mar 20 15:49:55 2010 -0400 +++ b/datasets/ftfile.py Sun Mar 21 19:30:05 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,