def forward(self, bottom, top):
# assign the output of the Python Layer as the input of the
# next layers
for i, t in enumerate(self.tops):
top[i].data[...] = self.data[t]
# 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
评论列表
文章目录