Class: TorchVision::Datasets::ImageFolder
- Inherits:
-
DatasetFolder
- Object
- Torch::Utils::Data::Dataset
- VisionDataset
- DatasetFolder
- TorchVision::Datasets::ImageFolder
- Defined in:
- lib/torchvision/datasets/image_folder.rb
Constant Summary collapse
- IMG_EXTENSIONS =
[".jpg", ".jpeg", ".png", ".ppm", ".bmp", ".pgm", ".tif", ".tiff", ".webp"]
Instance Attribute Summary
Attributes inherited from DatasetFolder
Attributes inherited from VisionDataset
Instance Method Summary collapse
-
#initialize(root, transform: nil, target_transform: nil, is_valid_file: nil) ⇒ ImageFolder
constructor
A new instance of ImageFolder.
Methods inherited from DatasetFolder
Constructor Details
#initialize(root, transform: nil, target_transform: nil, is_valid_file: nil) ⇒ ImageFolder
Returns a new instance of ImageFolder.
6 7 8 9 |
# File 'lib/torchvision/datasets/image_folder.rb', line 6 def initialize(root, transform: nil, target_transform: nil, is_valid_file: nil) super(root, extensions: IMG_EXTENSIONS, transform: transform, target_transform: target_transform, is_valid_file: is_valid_file) @imgs = @samples end |