Skip to content

Commit

Permalink
Bug fixes with dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
ragav committed Feb 3, 2017
1 parent 1517ded commit 29a8e5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions yann/special/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,11 @@ def cook_caltech256(verbose = 1, **kwargs):
"source" : 'skdata',
"name" : 'caltech256',
"location" : '',
"mini_batch_size" : 72,
"mini_batch_size" : 36,
"mini_batches_per_batch" : (1, 1, 1),
"batches2train" : 212,
"batches2test" : 113,
"batches2validate" : 100,
"batches2train" : 424,
"batches2test" : 226,
"batches2validate" : 200,
"height" : 224,
"width" : 224,
"channels" : 3 }
Expand Down
4 changes: 2 additions & 2 deletions yann/utils/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ def _create_skdata_caltech101(self, verbose = 2):
n_test_images = self.mini_batches_per_batch[2]*self.mini_batch_size * self.batches2test
n_valid_images = self.mini_batches_per_batch[1]*self.mini_batch_size * self.batches2validate

assert n_valid_images + n_train_images + n_test_images == total_images_in_dataset
assert n_valid_images + n_train_images + n_test_images <= total_images_in_dataset

if verbose >=2:
print ".. Setting up dataset"
Expand Down Expand Up @@ -1172,7 +1172,7 @@ def _create_skdata_caltech256(self, verbose = 2):
n_test_images = self.mini_batches_per_batch[2]*self.mini_batch_size * self.batches2test
n_valid_images = self.mini_batches_per_batch[1]*self.mini_batch_size * self.batches2validate

assert n_valid_images + n_train_images + n_test_images == total_images_in_dataset
assert n_valid_images + n_train_images + n_test_images <= total_images_in_dataset

if verbose >=2:
print ".. Setting up dataset"
Expand Down

0 comments on commit 29a8e5e

Please sign in to comment.