常用函数

2017-11-02  本文已影响0人  韩憨憾寒酣
数组随机打乱顺序:

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
返回

上一篇 下一篇

猜你喜欢

热点阅读