Closed OzanErcan6 closed 3 years ago
Output is below:
Traceback (most recent call last): File "main.py", line 10, in train_set, test_set = load_datasets(c.dataset_path, c.class_name) File "/home/ozan/differnet/differnet-master/utils.py", line 104, in load_datasets trainset = ImageFolderMultiTransform(data_dir_train, transform=transform_train, n_transforms=c.n_transforms) File "/home/ozan/differnet/differnet-master/multi_transform_loader.py", line 70, in init is_valid_file=is_valid_file, n_transforms=n_transforms) File "/home/ozan/differnet/differnet-master/multi_transform_loader.py", line 34, in init classes, class_to_idx = self._find_classes(self.root) AttributeError: 'ImageFolderMultiTransform' object has no attribute '_find_classes'
For the new torchvision version, use classes, class_to_idx = self.find_classes(self.root)
classes, class_to_idx = self.find_classes(self.root)
Thanks that solved !
Output is below:
Traceback (most recent call last): File "main.py", line 10, in
train_set, test_set = load_datasets(c.dataset_path, c.class_name)
File "/home/ozan/differnet/differnet-master/utils.py", line 104, in load_datasets
trainset = ImageFolderMultiTransform(data_dir_train, transform=transform_train, n_transforms=c.n_transforms)
File "/home/ozan/differnet/differnet-master/multi_transform_loader.py", line 70, in init
is_valid_file=is_valid_file, n_transforms=n_transforms)
File "/home/ozan/differnet/differnet-master/multi_transform_loader.py", line 34, in init
classes, class_to_idx = self._find_classes(self.root)
AttributeError: 'ImageFolderMultiTransform' object has no attribute '_find_classes'