layers.py 文件源码

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

项目:cnn_polyp_detection 作者: odysszis 项目源码 文件源码
def forward(self, bottom, top):
        # assign the output of the Python Layer as the input of the
        # next layers
        top[0].data[...] = self.data
        top[1].data[...] = self.label

        # pick next input randomly, if in train, or sequentially if in testing
        if self.random:
            self.idx = random.randint(0, len(self.indices)-1)
        else:
            self.idx += 1
            if self.idx == len(self.indices):
                self.idx = 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号