1 np.random.permutation() # 产生随机索引

  1. shuffle_index = np.random.permutation(60000)
  2. x_train = x_train[shuffle_index], y_train = y_train[shuffle_index]

 

np.array([1.1,2.2]).round() # 四舍五入

posted on 2022-02-14 18:31  低八度  阅读(28)  评论(0编辑  收藏  举报