Skip to content

Commit 250d195

Browse files
committed
fix the windows build error for correlation_layer
1 parent c12a6e3 commit 250d195

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/caffe/layers/correlation_layer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void CorrelateData(int num, int topwidth, int topheight, int topchannels, int to
3535

3636
for (int n = 0; n < num; ++n)
3737
{
38-
Dtype patch_data[kernel_size * kernel_size * bottomchannels];
38+
Dtype* patch_data = new Dtype[kernel_size * kernel_size * bottomchannels];
3939

4040
for (int y = 0; y < topheight; ++y)
4141
for (int x = 0; x < topwidth; ++x)
@@ -91,6 +91,7 @@ void CorrelateData(int num, int topwidth, int topheight, int topchannels, int to
9191
top[index + n * topcount] = sum / (float) sumelems;
9292
}
9393
}
94+
delete [] patch_data;
9495
}
9596
// Aggregate
9697
}

0 commit comments

Comments
 (0)