!16723 add default value for optional attribute.

From: @wangshuide2020
Reviewed-by: @liucunwei,@xsmq
Signed-off-by: @liucunwei
This commit is contained in:
mindspore-ci-bot 2021-05-21 18:17:09 +08:00 committed by Gitee
commit 99a6618306
7 changed files with 9 additions and 8 deletions

View File

@ -22,8 +22,8 @@ basic_lstm_cell_c_state_grad_op_info_v2 = TBERegOp("BasicLSTMCellCStateGradV2")
.binfile_name("basic_lstm_cell_c_state_grad.so") \
.compute_cost(10) \
.kernel_name("basic_lstm_cell_c_state_grad_v2") \
.attr("forget_bias", "optional", "float", "all") \
.attr("activation", "optional", "str", "all") \
.attr("forget_bias", "optional", "float", "all", "1") \
.attr("activation", "optional", "str", "all", "None") \
.partial_flag(True) \
.input(0, "c", False, "required", "all") \
.input(1, "dy", False, "required", "all") \

View File

@ -25,8 +25,8 @@ bounding_box_decode_op_info = TBERegOp("BoundingBoxDecode") \
.partial_flag(True) \
.attr("means", "optional", "listFloat", "all") \
.attr("stds", "optional", "listFloat", "all") \
.attr("max_shape", "optional", "listInt", "all") \
.attr("wh_ratio_clip", "optional", "float", "all") \
.attr("max_shape", "optional", "listInt", "all", "None") \
.attr("wh_ratio_clip", "optional", "float", "all", "0.016") \
.input(0, "rois", False, "required", "all") \
.input(1, "deltas", False, "required", "all") \
.output(0, "bboxes", False, "required", "all") \

View File

@ -32,6 +32,7 @@ dynamic_rnn_op_info = TBERegOp("DynamicRNN") \
.attr("time_major", "optional", "bool", "all", "true") \
.attr("activation", "optional", "str", "all", "tanh") \
.attr("forget_bias", "optional", "float", "all", "0") \
.attr("gate_order", "optional", "str", "all", "ijfo") \
.attr("is_training", "optional", "bool", "all", "true") \
.partial_flag(True) \
.input(0, "x", False, "required", "all") \

View File

@ -23,7 +23,7 @@ log_softmax_grad_op_info = TBERegOp("LogSoftmaxGrad") \
.compute_cost(10) \
.kernel_name("log_softmax_grad") \
.partial_flag(True) \
.attr("axis", "optional", "listInt", "all") \
.attr("axis", "optional", "listInt", "all", "-1") \
.input(0, "x", False, "required", "all") \
.input(1, "grad", False, "required", "all") \
.output(0, "y", False, "required", "all") \

View File

@ -24,7 +24,7 @@ space_to_depth_op_info = TBERegOp("SpaceToDepth") \
.kernel_name("space_to_depth") \
.partial_flag(True) \
.attr("block_size", "required", "int", "all") \
.attr("data_format", "optional", "str", "all") \
.attr("data_format", "optional", "str", "all", "NHWC") \
.input(0, "x", False, "required", "all") \
.input(1, "filter", False, "optional", "all") \
.output(0, "y", False, "required", "all") \

View File

@ -25,7 +25,7 @@ strided_slice_d_op_info = TBERegOp("StridedSlice") \
.partial_flag(True) \
.attr("begin", "optional", "listInt", "all") \
.attr("end", "optional", "listInt", "all") \
.attr("strides", "optional", "listInt", "all") \
.attr("strides", "optional", "listInt", "all", "None") \
.attr("begin_mask", "required", "int", "all") \
.attr("end_mask", "required", "int", "all") \
.attr("ellipsis_mask", "required", "int", "all") \

View File

@ -23,7 +23,7 @@ unstack_op_info = TBERegOp("Unstack") \
.compute_cost(10) \
.kernel_name("unpack") \
.partial_flag(True) \
.attr("num", "optional", "int", "all") \
.attr("num", "optional", "int", "all", "None") \
.attr("axis", "required", "int", "all") \
.input(0, "x", False, "required", "all") \
.output(0, "y", False, "dynamic", "all") \