neural_compressor.experimental.data.datasets.dummy_dataset_v2
¶
Dummy dataset for dummy_v2/sparse_dummy_v2 data generation on multiple framework backends.
Module Contents¶
Classes¶
Dataset used for dummy_v2 data generation. |
|
Dataset used for sparse_dummy_v2 data generation. |
- class neural_compressor.experimental.data.datasets.dummy_dataset_v2.DummyDataset(input_shape, label_shape=None, low=-128.0, high=127.0, dtype='float32', transform=None, filter=None)¶
Bases:
neural_compressor.experimental.data.datasets.dataset.IterableDataset
Dataset used for dummy_v2 data generation.
This Dataset is to construct a dataset from a input shape and label shape. The value range is calculated from: low * stand_normal(0, 1) + high.
- class neural_compressor.experimental.data.datasets.dummy_dataset_v2.SparseDummyDataset(dense_shape, label_shape=None, sparse_ratio=0.5, low=-128.0, high=127.0, dtype='float32', transform=None, filter=None)¶
Bases:
neural_compressor.experimental.data.datasets.dataset.IterableDataset
Dataset used for sparse_dummy_v2 data generation.
This Dataset is to construct a dataset from a input shape and label shape. The value range is calculated from: low * stand_normal(0, 1) + high.