常用函数

数组随机打乱顺序:

numpy.random.shuffle(x)
This function only shuffles the array along the first index of a multi-dimensional array 多维只按行打乱

数组合并

numpy.hstack(tup)
The arrays must have the same shape, except in the dimensioncorresponding toaxis(the first, by default).等价np.concatenate(tup, axis=1) 列合并

样本路径获取

os.listdir(path)
返回path路径下文件及文件夹名,不包括‘.’以及‘..’

tensorflow数据读取

tf.train.slice_input_producer
返回

你可能感兴趣的:(常用函数)