Browse Source

!13091 add op's attr default value

From: @laiyongqiang
Reviewed-by: @kisnwang,@jjfeing
Signed-off-by: @jjfeing
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 5 years ago
parent
commit
a4216577cd
4 changed files with 4 additions and 2 deletions
  1. +1
    -0
      mindspore/ops/_op_impl/tbe/avg_pool.py
  2. +1
    -0
      mindspore/ops/_op_impl/tbe/conv3d_transpose.py
  3. +1
    -1
      mindspore/ops/_op_impl/tbe/matmul.py
  4. +1
    -1
      mindspore/ops/_op_impl/tbe/one_hot.py

+ 1
- 0
mindspore/ops/_op_impl/tbe/avg_pool.py View File

@@ -27,6 +27,7 @@ avg_pool_op_info = TBERegOp("AvgPool") \
.attr("strides", "required", "listInt", "all") \
.attr("pad_mode", "required", "str", "all") \
.attr("format", "optional", "str", "all") \
.attr("offset_x", "optional", "int", "all", "0") \
.input(0, "x", False, "required", "all") \
.input(1, "filter", False, "optional", "all") \
.input(2, "bias", False, "optional", "all") \


+ 1
- 0
mindspore/ops/_op_impl/tbe/conv3d_transpose.py View File

@@ -30,6 +30,7 @@ conv3d_transpose_op_info = TBERegOp("Conv3DTranspose") \
.attr("groups", "optional", "int", "all") \
.attr("format", "optional", "str", "all") \
.attr("output_padding", "optional", "listInt", "all") \
.attr("offset_x", "optional", "int", "all", "0") \
.input(0, "x", False, "required", "all") \
.input(1, "filter", False, "required", "all") \
.input(2, "bias", False, "optional", "all") \


+ 1
- 1
mindspore/ops/_op_impl/tbe/matmul.py View File

@@ -26,7 +26,7 @@ matmul_op_info = TBERegOp("MatMul") \
.need_check_supported(True) \
.attr("transpose_x1", "required", "bool", "all") \
.attr("transpose_x2", "required", "bool", "all") \
.attr("offset_x", "optional", "int", "all") \
.attr("offset_x", "optional", "int", "all", "0") \
.input(0, "x1", False, "required", "all") \
.input(1, "x2", False, "required", "all") \
.input(2, "bias", False, "optional", "all") \


+ 1
- 1
mindspore/ops/_op_impl/tbe/one_hot.py View File

@@ -24,7 +24,7 @@ one_hot_op_info = TBERegOp("OneHot") \
.kernel_name("one_hot_d") \
.partial_flag(True) \
.attr("depth", "required", "int", "all") \
.attr("axis", "required", "int", "all") \
.attr("axis", "required", "int", "all", "-1") \
.input(0, "x", False, "required", "all") \
.input(1, "on_value", False, "required", "all") \
.input(2, "off_value", False, "required", "all") \


Loading…
Cancel
Save