normal¶
- class trojanvision.datasets.MNIST(norm_par={'mean': [0.1307], 'std': [0.3081]}, **kwargs)[source]¶
MNIST dataset. It inherits
trojanvision.datasets.ImageSet
.See also
torchvision:
torchvision.datasets.MNIST
paper: Gradient-based learning applied to document recognition
website: http://yann.lecun.com/exdb/mnist/
- class trojanvision.datasets.CIFAR10(norm_par={'mean': [0.49139968, 0.48215827, 0.44653124], 'std': [0.24703233, 0.24348505, 0.26158768]}, **kwargs)[source]¶
CIFAR10 dataset introduced by Alex Krizhevsky in 2009. It inherits
trojanvision.datasets.ImageSet
.See also
torchvision:
torchvision.datasets.CIFAR10
paper: Learning Multiple Layers of Features from Tiny Images
- class trojanvision.datasets.CIFAR100(norm_par={'mean': [0.49139968, 0.48215827, 0.44653124], 'std': [0.24703233, 0.24348505, 0.26158768]}, **kwargs)[source]¶
CIFAR100 dataset. It inherits
trojanvision.datasets.ImageSet
.See also
- class trojanvision.datasets.ImageNet16(norm_par={'mean': [122.68 / 255, 116.66 / 255, 104.01 / 255], 'std': [63.22 / 255, 61.26 / 255, 65.09 / 255]}, num_classes=1000, **kwargs)[source]¶
ImageNet16 dataset introduced by Patryk Chrabaszcz in 2017. It inherits
trojanvision.datasets.ImageSet
.See also
- class trojanvision.datasets.ImageNet32(norm_par={'mean': [122.68 / 255, 116.66 / 255, 104.01 / 255], 'std': [63.22 / 255, 61.26 / 255, 65.09 / 255]}, num_classes=1000, **kwargs)[source]¶
ImageNet32 dataset introduced by Patryk Chrabaszcz in 2017. It inherits
trojanvision.datasets.ImageSet
.See also
- class trojanvision.datasets.STL10(norm_par={'mean': [0.507, 0.487, 0.441], 'std': [0.267, 0.256, 0.276]}, **kwargs)[source]¶
STL10 dataset. It inherits
trojanvision.datasets.ImageSet
.See also
- Variables:
- get_transform(mode, normalize=None)[source]¶
Get dataset transform.
- Parameters:
mode (str) – The dataset mode (e.g.,
'train' | 'valid' | 'unlabeled' | 'train+unlabeled'
).normalize (bool | None) – Whether to use
torchvision.transforms.Normalize
in dataset transform. Defaults toself.normalize
.
- Returns:
torchvision.transforms.Compose – The transform sequence.