提交 d456c286 编写于 作者: H hedaoyuan

Fix some bug.

上级 4b1bc681
......@@ -87,7 +87,7 @@ void SliceProjection::backward(const UpdateCallback& callback) {
size_t offset = 0;
for (auto& slice : slices_) {
auto slice_out = in_->grad->subColMatrix(slice.first, slice.second);
slice_out->addAtOffset(*out_->grad, config_.offset());
slice_out->addAtOffset(*out_->grad, offset);
offset += slice_out->getWidth();
}
}
......
......@@ -167,7 +167,7 @@ TEST(Projection, slice) {
testProjectionGrad(conf,
INPUT_DATA,
/* parameterSize */ 0,
/* batchSize */ 100,
/* batchSize */ 10,
useGpu);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册