提交 48ea0471 编写于 作者: D dangqingqing

Bug fix in testing mode.

上级 b87427b6
...@@ -160,8 +160,10 @@ void ConcatenateLayer2::forward(PassType passType) { ...@@ -160,8 +160,10 @@ void ConcatenateLayer2::forward(PassType passType) {
size_t startCol = projCol_[i].first; size_t startCol = projCol_[i].first;
size_t endCol = projCol_[i].second; size_t endCol = projCol_[i].second;
projOutput_[i].value = output_.value->subColMatrix(startCol, endCol); projOutput_[i].value = output_.value->subColMatrix(startCol, endCol);
if (output_.grad) {
projOutput_[i].grad = output_.grad->subColMatrix(startCol, endCol); projOutput_[i].grad = output_.grad->subColMatrix(startCol, endCol);
} }
}
{ {
AsyncGpuBlock block; AsyncGpuBlock block;
......
...@@ -112,8 +112,10 @@ void SpatialPyramidPoolLayer::forward(PassType passType) { ...@@ -112,8 +112,10 @@ void SpatialPyramidPoolLayer::forward(PassType passType) {
size_t startCol = projCol_[i].first; size_t startCol = projCol_[i].first;
size_t endCol = projCol_[i].second; size_t endCol = projCol_[i].second;
projOutput_[i].value = output_.value->subColMatrix(startCol, endCol); projOutput_[i].value = output_.value->subColMatrix(startCol, endCol);
if (output_.grad) {
projOutput_[i].grad = output_.grad->subColMatrix(startCol, endCol); projOutput_[i].grad = output_.grad->subColMatrix(startCol, endCol);
} }
}
for (size_t i = 0; i < pyramidHeight_; i++) { for (size_t i = 0; i < pyramidHeight_; i++) {
poolProjections_[i]->forward(&getInput(0), &projOutput_[i], passType); poolProjections_[i]->forward(&getInput(0), &projOutput_[i], passType);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册