sciai.common.DatasetGenerator
- class sciai.common.DatasetGenerator(*data)[source]
 Common data generator.
- Parameters
 *data (any) – Data to be iterated over.
- Raises
 TypeError – If the input type is incorrect.
- Supported Platforms:
 GPUCPUAscend
Examples
>>> import numpy as np >>> from sciai.common import DatasetGenerator >>> data = np.array(range(128)).reshape(-1, 2) >>> dg = DatasetGenerator(data) >>> print(len(dg)) 64