MNISTData#
- class MNISTData[source]#
Class for loading MNIST dataset, inherits from
deepchecks.vision.classification_data.ClassificationData
.Implement the necessary methods for the
deepchecks.vision.classification_data.ClassificationData
interface.- __init__(data_loader: DataLoader, num_classes: Optional[int] = None, label_map: Optional[Dict[int, str]] = None, transform_field: Optional[str] = 'transforms', dataset_name: Optional[str] = None)[source]#
- __new__(*args, **kwargs)#
Attributes
Return dict of classes as keys, and list of corresponding indices (in Dataset) of samples that include this class (in the label). |
|
Return how many dimensions the image data have. |
|
Return the data loader. |
|
Return True if the data loader has images. |
|
Return True if the data loader has labels. |
|
Return a dictionary containing the number of samples per class. |
|
Return the number of classes in the dataset. |
|
Return the number of samples in the dataset. |
|
Return the number of samples in the original dataset. |
|
Return the task type (classification). |
|
Return the data loader. |
Methods
Assert the image formatter defined is valid. |
|
Assert the label formatter defined is valid. |
|
|
Return batch samples of the given batch indices. |
|
Convert a batch of mnist data to images. |
|
Convert a batch of mnist data to labels. |
|
Create new copy of this object, with the data-loader and dataset also copied, and altered by the given parameters. |
|
Create VisionData instance from a Dataset instance. |
Return a copy of the vision data object with the augmentation in the start of it. |
|
|
Get a labels batch and return classes inside it. |
Return transforms handler created from the transform field. |
|
|
Infer on a batch of mnist data. |
Initialize the cache of the classes' metadata info. |
|
Return whether the vision data is running on sample of the data. |
|
|
Return the name of the class with the given id. |
|
Use the defined collate_fn to transform a few data items to batch format. |
|
Return for the given batch_index the sample index in the dataset object. |
|
Get labels and update the classes' metadata info. |
|
Validate the correctness of the data class implementation according to the expected format. |
Validate that the get_classes function returns data in the correct format. |
|
Validate that the data is in the required format. |
|
Validate the inferred predictions from the batch. |
|
|
Validate the label. |
|
Validate the prediction. |
Verify presence of shared labels. |