Skip to content

Commit 2099cfa

Browse files
malfetfacebook-github-bot
authored andcommitted
Fix input_channels divisibility check in concat_split_op (pytorch#31448)
Summary: Pull Request resolved: pytorch#31448 Replace `(!x%y)` with `(x%y != 0)` Test Plan: CI Reviewed By: orionr Differential Revision: D19165492 fbshipit-source-id: 246635fb8ddd5823196bcef9d0e6cdf1c349015e
1 parent b38901a commit 2099cfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

caffe2/operators/concat_split_op.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ vector<TensorShape> TensorInferenceForSplit(
5555
// We cannot infer output shape until we see the value of split input
5656
return ret_invalid_shape();
5757
} else if (split.empty()) {
58-
if (!input_channels % output_size) {
58+
if (input_channels % output_size != 0) {
5959
LOG(WARNING) << "Input channels (" << input_channels
6060
<< ") should be divisible by number of outputs ("
6161
<< output_size << ")";

0 commit comments

Comments
 (0)