Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[Numpy] fix test_operator_gpu.test_upsampling_bilinear_with_type #14557

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/operator/nn/deconvolution-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ struct DeconvolutionParam : public dmlc::Parameter<DeconvolutionParam> {
}
}
} else {
for (size_t i = 0; i < ndim; i++) {
o_pad[i] = pad[i];
o_adj[i] = adj[i];
for (int i = 0; i < (int) ndim; i++) {
o_pad[i] = i < pad.ndim() ? pad[i] : 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According the initialization function, pad.ndim() should be equal to ndim here. Do you understand why i can be bigger than pad.ndim()?

Copy link
Member Author

@junrushao junrushao Mar 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The upsampling operator customized DeconvolutionParam here, which makes them not equal. It is kinda weird but I believe adj is not used in this case.

o_adj[i] = i < adj.ndim() ? adj[i] : 0;
}
}
}
Expand Down