From c5e935b8650ffc842ad009add7dde68e161a83ed Mon Sep 17 00:00:00 2001 From: Xiaoyu Zhang <35585791+BBuf@users.noreply.github.com> Date: Tue, 6 Jul 2021 01:37:23 +0800 Subject: [PATCH] Delete useless code upsample (#5392) * add argmax test * fix ci error * fix docstring warning * fix tensor greater and less bug * fix conflict * add test_flow_xxx_against_pytorch func * delete useless code * delete useless code Co-authored-by: oneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com> --- oneflow/user/ops/upsample_op.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/oneflow/user/ops/upsample_op.cpp b/oneflow/user/ops/upsample_op.cpp index 7c0c5c0c0..e09dfba54 100644 --- a/oneflow/user/ops/upsample_op.cpp +++ b/oneflow/user/ops/upsample_op.cpp @@ -60,8 +60,6 @@ REGISTER_USER_OP("upsample_grad") .SetTensorDescInferFn([](user_op::InferContext* ctx) -> Maybe<void> { const Shape& dy_shape = ctx->InputShape("dy", 0); Shape* dx_shape = ctx->OutputShape("dx", 0); - const float height_scale = ctx->Attr<float>("height_scale"); - const float width_scale = ctx->Attr<float>("width_scale"); if (ctx->Attr<std::string>("data_format") != "channels_first" || dy_shape.NumAxes() != 4) { LOG(FATAL) << "upsample_nearest only supports NCHW"; } -- GitLab