import numpy as np
def data_iter_random(data_indices, num_steps, batch_size):
example_size = len(data_indices)/num_steps
epoch_size = example_size/batch_size
example = [data_indices[i*num_steps:i*num_steps + num_steps]
for i in range(int(example_size))]
shuffle_example = np.random.shuffle(example)
print(shuffle_example)
data_iter_random(list(range(30)), 5, 2)
输出是 None
谁能告诉我出了什么问题?
相关分类