提交 4bb98d71 编写于 作者: - --get 提交者: jackzhang235

(ref): change argmax to arg_max

上级 975cd45d
......@@ -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);
......@@ -88,7 +88,7 @@ void test_argmax(const std::vector<int64_t>& input_shape, int axis) {
FillTensor<float, float>(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<int64_t>(axis));
......@@ -131,7 +131,7 @@ void test_argmax(const std::vector<int64_t>& 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);
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册