diff --git a/ngraph_creator/operations/src/ResizeBilinear.cpp b/ngraph_creator/operations/src/ResizeBilinear.cpp index 06da3d300..423914fef 100644 --- a/ngraph_creator/operations/src/ResizeBilinear.cpp +++ b/ngraph_creator/operations/src/ResizeBilinear.cpp @@ -71,7 +71,7 @@ std::shared_ptr ResizeBilinear::createNode() { if (checkInputOperandType(1, (int32_t)OperandType::FLOAT32)) { // In tensorflow lite, resizing by size is supported. Scaling factors are // calculated based on output shape. - attrs.shape_calculation_mode = ov::op::v4::Interpolate::ShapeCalcMode::sizes; + attrs.shape_calculation_mode = ov::op::v4::Interpolate::ShapeCalcMode::SIZES; width_scale = sModelInfo->ParseOperationInput(mNnapiOperationIndex, 1); height_scale = sModelInfo->ParseOperationInput(mNnapiOperationIndex, 2); out_width = (int)(input_width * width_scale); @@ -81,7 +81,7 @@ std::shared_ptr ResizeBilinear::createNode() { width_scale = (float)out_width / (float)input_width; height_scale = (float)out_height / (float)input_height; } else if (checkInputOperandType(1, (int32_t)OperandType::FLOAT16)) { - attrs.shape_calculation_mode = ov::op::v4::Interpolate::ShapeCalcMode::sizes; + attrs.shape_calculation_mode = ov::op::v4::Interpolate::ShapeCalcMode::SIZES; width_scale = sModelInfo->ParseOperationInput<_Float16>(mNnapiOperationIndex, 1); height_scale = sModelInfo->ParseOperationInput<_Float16>(mNnapiOperationIndex, 2); out_width = (int)(input_width * width_scale); @@ -89,7 +89,7 @@ std::shared_ptr ResizeBilinear::createNode() { width_scale = (float)out_width / (float)input_width; height_scale = (float)out_height / (float)input_height; } else if (checkInputOperandType(1, (int32_t)OperandType::INT32)) { - attrs.shape_calculation_mode = ov::op::v4::Interpolate::ShapeCalcMode::sizes; + attrs.shape_calculation_mode = ov::op::v4::Interpolate::ShapeCalcMode::SIZES; out_width = sModelInfo->ParseOperationInput(mNnapiOperationIndex, 1); out_height = sModelInfo->ParseOperationInput(mNnapiOperationIndex, 2); width_scale = (float)out_width / (float)input_width; @@ -98,19 +98,19 @@ std::shared_ptr ResizeBilinear::createNode() { if (align_corners == true) { attrs.coordinate_transformation_mode = - ov::op::v4::Interpolate::CoordinateTransformMode::align_corners; + ov::op::v4::Interpolate::CoordinateTransformMode::ALIGN_CORNERS; } else if (half_pixel == true) { attrs.coordinate_transformation_mode = - ov::op::v4::Interpolate::CoordinateTransformMode::half_pixel; + ov::op::v4::Interpolate::CoordinateTransformMode::HALF_PIXEL; } else { // If none of the align_corners and half_pixel are false, transformation // mode is set to asymmetric attrs.coordinate_transformation_mode = - ov::op::v4::Interpolate::CoordinateTransformMode::asymmetric; + ov::op::v4::Interpolate::CoordinateTransformMode::ASYMMETRIC; } // mode is passed as "linear" for bilinear interpolation - attrs.mode = ov::op::v4::Interpolate::InterpolateMode::linear_onnx; + attrs.mode = ov::op::v4::Interpolate::InterpolateMode::LINEAR_ONNX; std::vector output_shape = {out_height, out_width}; auto outputShapeNode = createConstNode(ov::element::i32, {2}, output_shape); diff --git a/ngraph_creator/operations/src/ResizeNearestNeighbor.cpp b/ngraph_creator/operations/src/ResizeNearestNeighbor.cpp index d1ee1fd61..b03f65494 100644 --- a/ngraph_creator/operations/src/ResizeNearestNeighbor.cpp +++ b/ngraph_creator/operations/src/ResizeNearestNeighbor.cpp @@ -62,7 +62,7 @@ std::shared_ptr ResizeNearestNeighbor::createNode() { if (!useNchw) inputNode = transpose(NHWC_NCHW, inputNode); - attrs.shape_calculation_mode = ov::op::v4::Interpolate::ShapeCalcMode::sizes; + attrs.shape_calculation_mode = ov::op::v4::Interpolate::ShapeCalcMode::SIZES; // mode is passed as "nearest" for Nearest Neighbor interpolation attrs.mode = ov::op::v4::Interpolate::InterpolateMode::nearest; attrs.nearest_mode = ov::op::v4::Interpolate::NearestMode::floor; @@ -88,17 +88,17 @@ std::shared_ptr ResizeNearestNeighbor::createNode() { if (align_corners == true) { attrs.coordinate_transformation_mode = - ov::op::v4::Interpolate::CoordinateTransformMode::align_corners; + ov::op::v4::Interpolate::CoordinateTransformMode::ALIGN_CORNERS; attrs.nearest_mode = ov::op::v4::Interpolate::NearestMode::round_prefer_ceil; } else if (half_pixel == true) { attrs.coordinate_transformation_mode = - ov::op::v4::Interpolate::CoordinateTransformMode::half_pixel; + ov::op::v4::Interpolate::CoordinateTransformMode::HALF_PIXEL; attrs.nearest_mode = ov::op::v4::Interpolate::NearestMode::round_prefer_ceil; } else { // If none of the align_corners and half_pixel are true, transformation // mode is set to asymmetric attrs.coordinate_transformation_mode = - ov::op::v4::Interpolate::CoordinateTransformMode::asymmetric; + ov::op::v4::Interpolate::CoordinateTransformMode::ASYMMETRIC; } std::vector output_shape = {out_height, out_width};