cnn_cascade_lasagne.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:Cascade-CNN-Face-Detection 作者: gogolgrind 项目源码 文件源码
def iterate_minibatches(self,X, y, batchsize, shuffle=False):
        assert len(X) == len(y)
        if shuffle:
            indices = sp.arange(len(X))
            sp.random.shuffle(indices)
        for start_idx in range(0, len(X) - batchsize + 1, batchsize):
            if shuffle:
                excerpt = indices[start_idx:start_idx + batchsize]
            else:
                excerpt = slice(start_idx, start_idx + batchsize)
            yield X[excerpt], y[excerpt]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号