Commit f3d751f4 authored by Aleksandr Rybnikov's avatar Aleksandr Rybnikov

Fixed bug

parent 2ca605a1
......@@ -63,12 +63,12 @@ void PaddingLayer::forward(std::vector<Blob*> &inputs, std::vector<Blob> &output
std::vector<Range> srcRanges(inShape.dims(), Range::all()), dstRanges = srcRanges;
for(int i = 0; i < srcDstRanges.size(); i++)
for(int j = 0; j < srcDstRanges.size(); j++)
{
if(!srcDstRanges[i].first.empty())
if(!srcDstRanges[j].first.empty())
{
srcRanges[dim] = srcDstRanges[i].first;
dstRanges[dim] = srcDstRanges[i].second;
srcRanges[dim] = srcDstRanges[j].first;
dstRanges[dim] = srcDstRanges[j].second;
Mat dst = outputs[i].matRef()(&dstRanges[0]);
Mat src = inputs[i]->matRef()(&srcRanges[0]).clone();
src.copyTo(dst);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment