def load_dataset_npy(file_name, dataset_size=None):
    """Load dataset from a .npy file."""
    data = np.load(file_name, allow_pickle=True)
    if dataset_size:
        data = data[:dataset_size]
    return data
Load dataset from a .npy file.
examples/speech_to_speech/benchmarking/data_utils.py