Skip to content

Commit

Permalink
Merge pull request #21 from JDAI-CV/fix_baseline_bconv
Browse files Browse the repository at this point in the history
Fix padding of baseline bconv
  • Loading branch information
daquexian authored May 17, 2019
2 parents c199480 + cd0c7c0 commit 5e66ac8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dabnn/layers/BinConv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,13 @@ void BinConv::forward_impl() const {
m, static_cast<uint64_t *>(col_mat->data), k,
static_cast<float *>(output_mat->data), m);
} else {
baseline_bconv(*padded_mat, *weight_mat, weight_mat->h,
weight_mat->w, 0, 0, stride_h, stride_w, 1, 1,
baseline_bconv(*input_mat, *weight_mat, weight_mat->h,
weight_mat->w, pad_h, pad_w, stride_h, stride_w, 1, 1,
output_mat->c, *output_mat);
}
} else {
pad(*input_mat, pad_h, pad_w, *padded_mat);
baseline_bconv(*padded_mat, *weight_mat, weight_mat->h, weight_mat->w,
0, 0, stride_h, stride_w, 1, 1, output_mat->c,
baseline_bconv(*input_mat, *weight_mat, weight_mat->h, weight_mat->w,
pad_h, pad_w, stride_h, stride_w, 1, 1, output_mat->c,
*output_mat);
}
}
Expand Down

0 comments on commit 5e66ac8

Please sign in to comment.