neural_compressor.experimental.data.datasets.imagenet_dataset

Dataset for ImageNet data generation on multiple framework backends.

Module Contents

Classes

ImagenetRaw

Configuration for ImageNet raw dataset.

PytorchImagenetRaw

Dataset for ImageNet data generation on pytorch backend.

MXNetImagenetRaw

Dataset for ImageNet data generation on mxnet backend.

TensorflowImagenetRaw

Dataset for ImageNet data generation on tensorflow/inteltensorflow/tensorflow_itex backend.

TensorflowImagenetDataset

Configuration for Imagenet dataset.

ONNXRTImagenetDataset

Configuration for Imagenet dataset.

class neural_compressor.experimental.data.datasets.imagenet_dataset.ImagenetRaw(data_path, image_list, transform=None, filter=None)

Bases: neural_compressor.experimental.data.datasets.dataset.Dataset

Configuration for ImageNet raw dataset.

Please arrange data in this way:

data_path/img1.jpg data_path/img2.jpg … data_path/imgx.jpg

dataset will read name and label of each image from image_list file, if user set image_list to None, it will read from data_path/val_map.txt automatically.

class neural_compressor.experimental.data.datasets.imagenet_dataset.PytorchImagenetRaw(data_path, image_list, transform=None, filter=None)

Bases: ImagenetRaw

Dataset for ImageNet data generation on pytorch backend.

class neural_compressor.experimental.data.datasets.imagenet_dataset.MXNetImagenetRaw(data_path, image_list, transform=None, filter=None)

Bases: ImagenetRaw

Dataset for ImageNet data generation on mxnet backend.

class neural_compressor.experimental.data.datasets.imagenet_dataset.TensorflowImagenetRaw(data_path, image_list, transform=None, filter=None)

Bases: ImagenetRaw

Dataset for ImageNet data generation on tensorflow/inteltensorflow/tensorflow_itex backend.

class neural_compressor.experimental.data.datasets.imagenet_dataset.TensorflowImagenetDataset

Bases: neural_compressor.experimental.data.datasets.dataset.IterableDataset

Configuration for Imagenet dataset.

class neural_compressor.experimental.data.datasets.imagenet_dataset.ONNXRTImagenetDataset(root, subset='val', num_cores=28, transform=None, filter=None)

Bases: neural_compressor.experimental.data.datasets.dataset.Dataset

Configuration for Imagenet dataset.