[ONNX] Convert to integral type in OneHot op (#4229)
Co-authored-by: Tomasz Dołbniak <tomasz.dolbniak@intel.com>
This commit is contained in:
parent
73e29c61d8
commit
7af2959bd0
@ -34,8 +34,8 @@ namespace ngraph
|
||||
OutputVector inputs{node.get_ng_inputs()};
|
||||
auto indices =
|
||||
std::make_shared<default_opset::Convert>(inputs.at(0), element::i64);
|
||||
auto depth = reshape::interpret_as_scalar(inputs.at(1));
|
||||
|
||||
auto depth = std::make_shared<default_opset::Convert>(
|
||||
reshape::interpret_as_scalar(inputs.at(1)), element::i64);
|
||||
// Rank 1 tensor containing exactly two elements: [off_value, on_value]
|
||||
auto values = inputs.at(2);
|
||||
auto split_axis = default_opset::Constant::create(element::i64, {}, {0});
|
||||
|
@ -130,12 +130,6 @@ xfail_issue_43742 = xfail_test(reason="RuntimeError: nGraph does not support the
|
||||
"If")
|
||||
xfail_issue_45457 = xfail_test(reason="RuntimeError: Unsupported dynamic ops: v5::Loop"
|
||||
"Not constant termination condition body output is not supported")
|
||||
xfail_issue_38715 = xfail_test(reason="RuntimeError: While validating ONNX node '<Node(OneHot): y>':"
|
||||
"While validating node 'v1::OneHot OneHot_<number>"
|
||||
"(Convert_13525[0]:i64{3}, depth[0]:f32{},"
|
||||
"Squeeze_13532[0]:i32{}, Squeeze_13529[0]:i32{}) -> (dynamic?)'"
|
||||
"with friendly_name 'OneHot_13534':"
|
||||
"Depth must be integral element type.")
|
||||
xfail_issue_38722 = xfail_test(reason="RuntimeError: While validating ONNX nodes MatMulInteger"
|
||||
"and QLinearMatMul"
|
||||
"Input0 scale and input0 zero point shape must be same and 1")
|
||||
|
@ -55,7 +55,6 @@ from tests import (BACKEND_NAME,
|
||||
xfail_issue_38712,
|
||||
xfail_issue_38713,
|
||||
xfail_issue_38714,
|
||||
xfail_issue_38715,
|
||||
xfail_issue_33488,
|
||||
xfail_issue_33589,
|
||||
xfail_issue_33535,
|
||||
@ -89,7 +88,8 @@ from tests import (BACKEND_NAME,
|
||||
xfail_issue_46765,
|
||||
xfail_issue_47317,
|
||||
xfail_issue_47323,
|
||||
xfail_issue_47330)
|
||||
xfail_issue_47330,
|
||||
xfail_issue_47337)
|
||||
|
||||
|
||||
def expect_fail(test_case_path, xfail): # type: (str) -> None
|
||||
@ -558,7 +558,7 @@ tests_expected_to_fail = [
|
||||
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_round_prefer_ceil_asymmetric_cpu", # noqa
|
||||
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_floor_align_corners_cpu",
|
||||
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_cpu"),
|
||||
(xfail_issue_38715,
|
||||
(xfail_issue_47337,
|
||||
"OnnxBackendNodeModelTest.test_onehot_without_axis_cpu",
|
||||
"OnnxBackendNodeModelTest.test_onehot_with_negative_axis_cpu",
|
||||
"OnnxBackendNodeModelTest.test_onehot_with_axis_cpu",
|
||||
|
@ -135,7 +135,6 @@ onnx_dyn_shapes_slice_10_4d_input_2103_axes_ends_max
|
||||
onnx_dyn_shapes_slice_10_4d_input_23_axes_21_steps
|
||||
onnx_dyn_shapes_slice_10_3d_input_12_axes
|
||||
onnx_top_k_opset_10
|
||||
onnx_model_one_hot_without_axis
|
||||
onnx_model_scatterND_param_i64_indices
|
||||
|
||||
# [NOT_IMPLEMENTED] Input image format U64 is not supported yet...
|
||||
@ -169,6 +168,9 @@ onnx_model_quantize_linear_const_scale_const_zero_p
|
||||
|
||||
# Incorrect number of 'indices_to_squeeze' input dimensions!
|
||||
arg_min_no_keep_dims_dyn_shape
|
||||
|
||||
# OneHot operation has a form that is not supported
|
||||
onnx_model_one_hot_without_axis
|
||||
onnx_model_one_hot_with_axis
|
||||
|
||||
# Dynamic function 'get_shape was called on a descriptor::Tensor with dynamic shape'
|
||||
|
@ -76,8 +76,6 @@ INTERPRETER.auto_bcast_binary_elementwise_pdpd
|
||||
|
||||
# Revise reference implementation
|
||||
onnx_dyn_model_hardmax
|
||||
onnx_model_one_hot_with_axis
|
||||
onnx_model_one_hot_with_axis
|
||||
onnx_model_quantize_linear_const_scale_const_zero_p
|
||||
onnx_model_quantize_linear
|
||||
onnx_model_quantize_linear_axis_zero
|
||||
|
Loading…
Reference in New Issue
Block a user