Skip to content

Commit

Permalink
Fix TensorMNIST download folder
Browse files Browse the repository at this point in the history
  • Loading branch information
lrzpellegrini committed Feb 7, 2024
1 parent 700968e commit 5fbb066
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions avalanche/benchmarks/datasets/external_datasets/mnist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import dill
import os
from torchvision.datasets import MNIST
from avalanche.benchmarks.datasets import default_dataset_location
from avalanche.checkpointing import constructor_based_serialization
Expand All @@ -23,6 +24,15 @@ def __getitem__(self, index: int):
target = self.target_transform(target)

return img, target

# Override property raw_folder
@property
def raw_folder(self) -> str:
return os.path.join(self.root, "MNIST", "raw")

@property
def processed_folder(self) -> str:
return os.path.join(self.root, "MNIST", "processed")


def get_mnist_dataset(dataset_root):
Expand Down

0 comments on commit 5fbb066

Please sign in to comment.