Skip to content

Commit

Permalink
set_lower_bound(1) so that stride is not zero
Browse files Browse the repository at this point in the history
in issue: apache#18942, an error was occurring where strides became zero. to solve the issue, the lower bounds of stride1 and stride2 have been set to 1.
  • Loading branch information
ekdnam authored Aug 24, 2020
1 parent 0de7484 commit 15c2a00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/operator/correlation-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ struct CorrelationParam : public dmlc::Parameter<CorrelationParam> {
.describe("kernel size for Correlation must be an odd number");
DMLC_DECLARE_FIELD(max_displacement).set_default(1)
.describe("Max displacement of Correlation ");
DMLC_DECLARE_FIELD(stride1).set_default(1)
DMLC_DECLARE_FIELD(stride1).set_default(1).set_lower_bound(1)
.describe("stride1 quantize data1 globally");
DMLC_DECLARE_FIELD(stride2).set_default(1)
DMLC_DECLARE_FIELD(stride2).set_default(1).set_lower_bound(1)
.describe("stride2 quantize data2 within the neighborhood centered around data1");
DMLC_DECLARE_FIELD(pad_size).set_default(0)
.describe("pad for Correlation");
Expand Down

0 comments on commit 15c2a00

Please sign in to comment.