huawei-noah / vega

AutoML tools chain
http://www.noahlab.com.hk/opensource/vega/
Other
842 stars 175 forks source link

quick start example question #199

Closed Prokrus closed 2 years ago

Prokrus commented 2 years ago

In Quick Start example, even I set train_portion of validation as 0.9:

valid: shuffle: False num_workers: 8 batch_size: 256 train_portion: 0.9

in Cifar10 dataset, when mode is val, its train_portion is still 1.0.

def init(self, kwargs): """Construct the Cifar10 class.""" Dataset.init(self, kwargs) self.args.data_path = FileOps.download_dataset(self.args.data_path) is_train = self.mode == 'train' or self.mode == 'val' and self.args.train_portion < 1 self.base_folder = 'cifar-10-batches-py' if is_train: files_list = ["data_batch_1", "data_batch_2", "data_batch_3", "data_batch_4", "data_batch_5"] else: files_list = ['test_batch'] self.data = [] self.targets = []

This will lead to is_train is False when mode is val.

Prokrus commented 2 years ago

I think I know, it should be "val" in .yml, not "valid"