-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathload_data.py
More file actions
41 lines (33 loc) · 782 Bytes
/
load_data.py
File metadata and controls
41 lines (33 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from torchvision.datasets import MNIST
from MNIST_mods.confusing_MNIST import Confusing_MNIST
from torchvision.transforms import ToTensor
def training_data():
return MNIST(
root="data",
train=True,
download=True,
transform=ToTensor()
)
def test_data():
return MNIST(
root="data",
train=False,
download=True,
transform=ToTensor()
)
def confusing_training_data():
return Confusing_MNIST(
root="data",
train=True,
download=True,
transform=ToTensor(),
match_ratio=0.5
)
def confusing_test_data():
return Confusing_MNIST(
root="data",
train=False,
download=True,
transform=ToTensor(),
match_ratio=0.5
)