import numpy as npdef 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谁能告诉我出了什么问题?
添加回答
举报
0/150
提交
取消