From 4bb98d711ab0a2b8a828c92d31dce6cddf07870f Mon Sep 17 00:00:00 2001 From: --get Date: Wed, 27 May 2020 11:31:44 +0000 Subject: [PATCH] (ref): change argmax to arg_max --- lite/kernels/mlu/bridges/argmax_op.cc | 2 +- lite/kernels/mlu/bridges/argmax_op_test.cc | 6 +++--- lite/kernels/mlu/bridges/paddle_use_bridges.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lite/kernels/mlu/bridges/argmax_op.cc b/lite/kernels/mlu/bridges/argmax_op.cc index 8ad5941c40..11ef93b7d2 100644 --- a/lite/kernels/mlu/bridges/argmax_op.cc +++ b/lite/kernels/mlu/bridges/argmax_op.cc @@ -66,6 +66,6 @@ int ArgmaxConverter(void* ctx, OpLite* op, KernelBase* kernel) { } // namespace lite } // namespace paddle -REGISTER_SUBGRAPH_BRIDGE(argmax, +REGISTER_SUBGRAPH_BRIDGE(arg_max, kMLU, paddle::lite::subgraph::mlu::ArgmaxConverter); diff --git a/lite/kernels/mlu/bridges/argmax_op_test.cc b/lite/kernels/mlu/bridges/argmax_op_test.cc index 8c6915d248..9eeb172812 100644 --- a/lite/kernels/mlu/bridges/argmax_op_test.cc +++ b/lite/kernels/mlu/bridges/argmax_op_test.cc @@ -88,7 +88,7 @@ void test_argmax(const std::vector& input_shape, int axis) { FillTensor(x, -9, 9); // initialize op desc cpp::OpDesc opdesc; - opdesc.SetType("argmax"); + opdesc.SetType("arg_max"); opdesc.SetInput("X", {x_var_name}); opdesc.SetOutput("Out", {out_var_name}); opdesc.SetAttr("axis", static_cast(axis)); @@ -131,7 +131,7 @@ void test_argmax(const std::vector& input_shape, int axis) { } } -TEST(MLUBridges, argmax) { +TEST(MLUBridges, arg_max) { test_argmax({1, 2, 3, 4}, 1); test_argmax({1, 2, 3, 4}, 2); test_argmax({1, 2, 3, 4}, 3); @@ -142,4 +142,4 @@ TEST(MLUBridges, argmax) { } // namespace lite } // namespace paddle -USE_SUBGRAPH_BRIDGE(argmax, kMLU); +USE_SUBGRAPH_BRIDGE(arg_max, kMLU); diff --git a/lite/kernels/mlu/bridges/paddle_use_bridges.h b/lite/kernels/mlu/bridges/paddle_use_bridges.h index f286bb66fd..703687df87 100644 --- a/lite/kernels/mlu/bridges/paddle_use_bridges.h +++ b/lite/kernels/mlu/bridges/paddle_use_bridges.h @@ -32,7 +32,7 @@ USE_SUBGRAPH_BRIDGE(scale, kMLU); USE_SUBGRAPH_BRIDGE(sigmoid, kMLU); USE_SUBGRAPH_BRIDGE(elementwise_mul, kMLU); USE_SUBGRAPH_BRIDGE(dropout, kMLU); -USE_SUBGRAPH_BRIDGE(argmax, kMLU); +USE_SUBGRAPH_BRIDGE(arg_max, kMLU); USE_SUBGRAPH_BRIDGE(split, kMLU); USE_SUBGRAPH_BRIDGE(cast, kMLU); USE_SUBGRAPH_BRIDGE(layout, kMLU); -- GitLab