remove unnecessary flags

test=develop
revert-15296-async_double_buffered_py_reader
tink2123 6 years ago
parent 6961a94e94
commit 909f864a9b

@ -227,8 +227,7 @@ class InterpolateOpCUDAKernel : public framework::OpKernel<T> {
: static_cast<float>(in_h) / out_h;
}
if (out_w > 1) {
ratio_w = (align_corners && out_w > 1)
? static_cast<float>(in_w - 1) / (out_w - 1)
ratio_w = (align_corners) ? static_cast<float>(in_w - 1) / (out_w - 1)
: static_cast<float>(in_w) / out_w;
}
@ -302,8 +301,7 @@ class InterpolateGradOpCUDAKernel : public framework::OpKernel<T> {
: static_cast<float>(in_h) / out_h;
}
if (out_w > 1) {
ratio_w = (align_corners && out_w > 1)
? static_cast<float>(in_w - 1) / (out_w - 1)
ratio_w = (align_corners) ? static_cast<float>(in_w - 1) / (out_w - 1)
: static_cast<float>(in_w) / out_w;
}

@ -199,8 +199,7 @@ class InterpolateKernel : public framework::OpKernel<T> {
: static_cast<float>(in_h) / out_h;
}
if (out_w > 1) {
ratio_w = (align_corners && out_w > 1)
? static_cast<float>(in_w - 1) / (out_w - 1)
ratio_w = (align_corners) ? static_cast<float>(in_w - 1) / (out_w - 1)
: static_cast<float>(in_w) / out_w;
}
@ -258,8 +257,7 @@ class InterpolateGradKernel : public framework::OpKernel<T> {
: static_cast<float>(in_h) / out_h;
}
if (out_w > 1) {
ratio_w = (align_corners && out_w > 1)
? static_cast<float>(in_w - 1) / (out_w - 1)
ratio_w = (align_corners) ? static_cast<float>(in_w - 1) / (out_w - 1)
: static_cast<float>(in_w) / out_w;
}

Loading…
Cancel
Save