美文网首页
常用函数

常用函数

作者: 韩憨憾寒酣 | 来源:发表于2017-11-02 22:37 被阅读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
    返回

    相关文章

      网友评论

          本文标题:常用函数

          本文链接:https://www.haomeiwen.com/subject/sgtzpxtx.html