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
评论列表
文章目录