flambe.vision.classification.datasets
¶
Module Contents¶
-
class
flambe.vision.classification.datasets.
MNISTDataset
(train_images: np.ndarray = None, train_labels: np.ndarray = None, test_images: np.ndarray = None, test_labels: np.ndarray = None, val_ratio: Optional[float] = 0.2, seed: Optional[int] = None)[source]¶ Bases:
flambe.dataset.Dataset
The official MNIST dataset.
-
classmethod
from_path
(cls, train_images_path: str, train_labels_path: str, test_images_path: str, test_labels_path: str, val_ratio: Optional[float] = 0.2, seed: Optional[int] = None)[source]¶ Initialize the MNISTDataset from local files.
Parameters: - train_images_path (str) – path to the train images file in the idx format
- train_labels_path (str) – path to the train labels file in the idx format
- test_images_path (str) – path to the test images file in the idx format
- test_labels_path (str) – path to the test labels file in the idx format
- val_ratio (Optional[float]) – validation set ratio. Default 0.2
- seed (Optional[int]) – random seed for the validation set split
-
classmethod