def reshape(self, bottom, top):
batch = int(solver.cmd.input_shape[0] / solver.size)
input_shape = [batch,
solver.cmd.input_shape[1],
solver.cmd.input_shape[2],
solver.cmd.input_shape[3], ]
top[0].reshape(*input_shape)
print('top[0] shape ', list(top[0].shape), file = sys.stderr)
if self.phase == caffe.TRAIN:
top[1].reshape(batch, 1)
print('top[1] shape ', list(top[1].shape), file = sys.stderr)
评论列表
文章目录