Skip to content

Commit

Permalink
[Werror] fix Werror-maybe-uninitialized in roi_align_grad_kernel (#51633
Browse files Browse the repository at this point in the history
)

* fix Werror in roi_align_grad_kernel

* adopt a better way
  • Loading branch information
jinyouzhi authored Mar 20, 2023
1 parent d703545 commit 5786f3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddle/phi/kernels/cpu/roi_align_grad_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void RoiAlignGradKernel(const Context& dev_ctx,
int sampling_ratio,
bool aligned,
DenseTensor* dx) {
auto in_dims = x.dims();
const auto& in_dims = x.dims();
int channels = in_dims[1];
int height = in_dims[2];
int width = in_dims[3];
Expand Down

0 comments on commit 5786f3e

Please sign in to comment.