Open xinfu607 opened 4 years ago
Hi,I meet "AttributeError" when running "cifar_train.py". Could you please tell me how to fix it ?
Downloading https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz to ./datasets/imbalance_cifar10/cifar-10-python.tar.gz 212664376it [00:19, 38731722.29it/s]Traceback (most recent call last): File "/xinfu/code/long_tail/BBN/main/train.py", line 69, in train_set = eval(cfg.DATASET.DATASET)("train", cfg) File "/xinfu/code/long_tail/BBN/lib/dataset/imbalance_cifar.py", line 25, in init img_num_list = self.get_img_num_per_cls(self.cls_num, imb_type, imb_factor) File "/xinfu/code/long_tail/BBN/lib/dataset/imbalance_cifar.py", line 44, in get_img_num_per_cls img_max = len(self.data) / cls_num AttributeError: 'IMBALANCECIFAR10' object has no attribute 'data'
check your version of pytorch, try "train_data" instead
Hi,I meet "AttributeError" when running "cifar_train.py". Could you please tell me how to fix it ?
Downloading https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz to ./datasets/imbalance_cifar10/cifar-10-python.tar.gz 212664376it [00:19, 38731722.29it/s]Traceback (most recent call last): File "/xinfu/code/long_tail/BBN/main/train.py", line 69, in train_set = eval(cfg.DATASET.DATASET)("train", cfg) File "/xinfu/code/long_tail/BBN/lib/dataset/imbalance_cifar.py", line 25, in init img_num_list = self.get_img_num_per_cls(self.cls_num, imb_type, imb_factor) File "/xinfu/code/long_tail/BBN/lib/dataset/imbalance_cifar.py", line 44, in get_img_num_per_cls img_max = len(self.data) / cls_num AttributeError: 'IMBALANCECIFAR10' object has no attribute 'data'