• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ContinualAI / avalanche / 5399886876

pending completion
5399886876

Pull #1398

github

web-flow
Merge 2c8aba8e6 into a61ae5cab
Pull Request #1398: switch to black formatting

1023 of 1372 new or added lines in 177 files covered. (74.56%)

144 existing lines in 66 files now uncovered.

16366 of 22540 relevant lines covered (72.61%)

2.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

67.05
/avalanche/benchmarks/datasets/torchvision_wrapper.py
1
################################################################################
2
# Copyright (c) 2021 ContinualAI.                                              #
3
# Copyrights licensed under the MIT License.                                   #
4
# See the accompanying LICENSE file for terms.                                 #
5
#                                                                              #
6
# Date: 1-05-2020                                                              #
7
# Author(s): Vincenzo Lomonaco                                                 #
8
# E-mail: contact@continualai.org                                              #
9
# Website: www.continualai.org                                                 #
10
################################################################################
11

12
""" This module conveniently wraps Pytorch Datasets for using a clean and
4✔
13
comprehensive Avalanche API."""
14

15
from torchvision.datasets import MNIST as torchMNIST
4✔
16
from torchvision.datasets import FashionMNIST as torchFashionMNIST
4✔
17
from torchvision.datasets import KMNIST as torchKMNIST
4✔
18
from torchvision.datasets import EMNIST as torchEMNIST
4✔
19
from torchvision.datasets import QMNIST as torchQMNIST
4✔
20
from torchvision.datasets import FakeData as torchFakeData
4✔
21
from torchvision.datasets import CocoCaptions as torchCocoCaptions
4✔
22
from torchvision.datasets import CocoDetection as torchCocoDetection
4✔
23
from torchvision.datasets import LSUN as torchLSUN
4✔
24
from torchvision.datasets import ImageFolder as torchImageFolder
4✔
25
from torchvision.datasets import DatasetFolder as torchDatasetFolder
4✔
26
from torchvision.datasets import ImageNet as torchImageNet
4✔
27
from torchvision.datasets import CIFAR10 as torchCIFAR10
4✔
28
from torchvision.datasets import CIFAR100 as torchCIFAR100
4✔
29
from torchvision.datasets import STL10 as torchSTL10
4✔
30
from torchvision.datasets import SVHN as torchSVHN
4✔
31
from torchvision.datasets import PhotoTour as torchPhotoTour
4✔
32
from torchvision.datasets import SBU as torchSBU
4✔
33
from torchvision.datasets import Flickr8k as torchFlickr8k
4✔
34
from torchvision.datasets import Flickr30k as torchFlickr30k
4✔
35
from torchvision.datasets import VOCDetection as torchVOCDetection
4✔
36
from torchvision.datasets import VOCSegmentation as torchVOCSegmentation
4✔
37
from torchvision.datasets import Cityscapes as torchCityscapes
4✔
38
from torchvision.datasets import SBDataset as torchSBDataset
4✔
39
from torchvision.datasets import USPS as torchUSPS
4✔
40
from torchvision.datasets import HMDB51 as torchKHMDB51
4✔
41
from torchvision.datasets import UCF101 as torchUCF101
4✔
42
from torchvision.datasets import CelebA as torchCelebA
4✔
43

44

45
def MNIST(*args, **kwargs):
4✔
46
    return torchMNIST(*args, **kwargs)
×
47

48

49
def FashionMNIST(*args, **kwargs):
4✔
50
    return torchFashionMNIST(*args, **kwargs)
×
51

52

53
def KMNIST(*args, **kwargs):
4✔
54
    return torchKMNIST(*args, **kwargs)
×
55

56

57
def EMNIST(*args, **kwargs):
4✔
58
    return torchEMNIST(*args, **kwargs)
×
59

60

61
def QMNIST(*args, **kwargs):
4✔
62
    return torchQMNIST(*args, **kwargs)
×
63

64

65
def FakeData(*args, **kwargs):
4✔
66
    return torchFakeData(*args, **kwargs)
×
67

68

69
def CocoCaptions(*args, **kwargs):
4✔
70
    return torchCocoCaptions(*args, **kwargs)
×
71

72

73
def CocoDetection(*args, **kwargs):
4✔
74
    return torchCocoDetection(*args, **kwargs)
×
75

76

77
def LSUN(*args, **kwargs):
4✔
78
    return torchLSUN(*args, **kwargs)
×
79

80

81
def ImageFolder(*args, **kwargs):
4✔
82
    return torchImageFolder(*args, **kwargs)
×
83

84

85
def DatasetFolder(*args, **kwargs):
4✔
86
    return torchDatasetFolder(*args, **kwargs)
×
87

88

89
def ImageNet(*args, **kwargs):
4✔
90
    return torchImageNet(*args, **kwargs)
×
91

92

93
def CIFAR10(*args, **kwargs):
4✔
94
    return torchCIFAR10(*args, **kwargs)
×
95

96

97
def CIFAR100(*args, **kwargs):
4✔
98
    return torchCIFAR100(*args, **kwargs)
×
99

100

101
def STL10(*args, **kwargs):
4✔
102
    return torchSTL10(*args, **kwargs)
×
103

104

105
def SVHN(*args, **kwargs):
4✔
106
    return torchSVHN(*args, **kwargs)
×
107

108

109
def PhotoTour(*args, **kwargs):
4✔
110
    return torchPhotoTour(*args, **kwargs)
×
111

112

113
def SBU(*args, **kwargs):
4✔
114
    return torchSBU(*args, **kwargs)
×
115

116

117
def Flickr8k(*args, **kwargs):
4✔
118
    return torchFlickr8k(*args, **kwargs)
×
119

120

121
def Flickr30k(*args, **kwargs):
4✔
122
    return torchFlickr30k(*args, **kwargs)
×
123

124

125
def VOCDetection(*args, **kwargs):
4✔
126
    return torchVOCDetection(*args, **kwargs)
×
127

128

129
def VOCSegmentation(*args, **kwargs):
4✔
130
    return torchVOCSegmentation(*args, **kwargs)
×
131

132

133
def Cityscapes(*args, **kwargs):
4✔
134
    return torchCityscapes(*args, **kwargs)
×
135

136

137
def SBDataset(*args, **kwargs):
4✔
138
    return torchSBDataset(*args, **kwargs)
×
139

140

141
def USPS(*args, **kwargs):
4✔
142
    return torchUSPS(*args, **kwargs)
×
143

144

145
def HMDB51(*args, **kwargs):
4✔
146
    return torchKHMDB51(*args, **kwargs)
×
147

148

149
def UCF101(*args, **kwargs):
4✔
150
    return torchUCF101(*args, **kwargs)
×
151

152

153
def CelebA(*args, **kwargs):
4✔
154
    return torchCelebA(*args, **kwargs)
×
155

156

157
if __name__ == "__main__":
4✔
UNCOV
158
    mnist = MNIST(".", download=True)
×
159

160

161
__all__ = [
4✔
162
    "MNIST",
163
    "FashionMNIST",
164
    "KMNIST",
165
    "EMNIST",
166
    "QMNIST",
167
    "FakeData",
168
    "CocoCaptions",
169
    "CocoDetection",
170
    "LSUN",
171
    "LSUN",
172
    "ImageFolder",
173
    "DatasetFolder",
174
    "ImageNet",
175
    "CIFAR10",
176
    "CIFAR100",
177
    "STL10",
178
    "SVHN",
179
    "PhotoTour",
180
    "SBU",
181
    "Flickr8k",
182
    "Flickr30k",
183
    "VOCDetection",
184
    "VOCSegmentation",
185
    "Cityscapes",
186
    "SBDataset",
187
    "USPS",
188
    "HMDB51",
189
    "UCF101",
190
    "CelebA",
191
]
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc