13
13
#include " openvino/opsets/opset8.hpp"
14
14
#include " openvino/util/common_util.hpp"
15
15
#include " transformations/rt_info/preprocessing_attribute.hpp"
16
- #include " openvino/opsets/opset1.hpp"
17
16
18
17
namespace ov {
19
18
namespace preprocess {
@@ -100,9 +99,9 @@ void PreStepsList::add_scale_impl(const std::vector<float>& values) {
100
99
" scale " + vector_to_string (values));
101
100
}
102
101
103
- void PreStepsList::add_clamp (float min_value, float max_value) {
102
+ void PreStepsList::add_clamp (double min_value, double max_value) {
104
103
std::string name = " clamp(min " + std::to_string (min_value) + " , max " + std::to_string (max_value) + " )" ;
105
-
104
+
106
105
m_actions.emplace_back (
107
106
[min_value, max_value](const std::vector<Output<Node>>& nodes,
108
107
const std::shared_ptr<Model>& function,
@@ -111,10 +110,11 @@ void PreStepsList::add_clamp(float min_value, float max_value) {
111
110
" Can't apply clamp to multi-plane input. Suggesting to convert current image to "
112
111
" RGB/BGR color format using 'PreProcessSteps::convert_color'" );
113
112
114
- const auto & node = nodes[ 0 ] ;
113
+ const auto & node = nodes. front () ;
115
114
auto element_type = node.get_element_type ();
116
115
OPENVINO_ASSERT (element_type.is_real (),
117
- " Clamp preprocessing can be applied to 'float' inputs. Consider using 'convert_element_type' before clamping. Current type is: " ,
116
+ " Clamp preprocessing can be applied to 'double' inputs. Consider using "
117
+ " 'convert_element_type' before clamping. Current type is: " ,
118
118
element_type);
119
119
120
120
auto clamp_op = std::make_shared<ov::op::v0::Clamp>(node, min_value, max_value);
@@ -123,7 +123,6 @@ void PreStepsList::add_clamp(float min_value, float max_value) {
123
123
name);
124
124
}
125
125
126
-
127
126
void PreStepsList::add_mean_impl (const std::vector<float >& values) {
128
127
m_actions.emplace_back (
129
128
[values](const std::vector<Output<Node>>& nodes,
0 commit comments