remove unnecessary flags

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

@ -227,9 +227,8 @@ 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)
: static_cast<float>(in_w) / out_w;
ratio_w = (align_corners) ? static_cast<float>(in_w - 1) / (out_w - 1)
: static_cast<float>(in_w) / out_w;
}
if (in_h == out_h && in_w == out_w) {
@ -302,9 +301,8 @@ 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)
: static_cast<float>(in_w) / out_w;
ratio_w = (align_corners) ? static_cast<float>(in_w - 1) / (out_w - 1)
: static_cast<float>(in_w) / out_w;
}
if (in_h == out_h && in_w == out_w) {

@ -199,9 +199,8 @@ 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)
: static_cast<float>(in_w) / out_w;
ratio_w = (align_corners) ? static_cast<float>(in_w - 1) / (out_w - 1)
: static_cast<float>(in_w) / out_w;
}
if ("bilinear" == interp_method) {
@ -258,9 +257,8 @@ 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)
: static_cast<float>(in_w) / out_w;
ratio_w = (align_corners) ? static_cast<float>(in_w - 1) / (out_w - 1)
: static_cast<float>(in_w) / out_w;
}
if ("bilinear" == interp_method) {

Loading…
Cancel
Save