Skip to content

Commit cb49167

Browse files
committed
Remove redundant assertions for element type in clamp preprocessing and postprocessing
1 parent 85b9f0d commit cb49167

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/core/src/preprocess/preprocess_steps_impl.cpp

-12
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,6 @@ void PreStepsList::add_clamp(double min_value, double max_value) {
111111
"RGB/BGR color format using 'PreProcessSteps::convert_color'");
112112

113113
const auto& node = nodes.front();
114-
const auto& element_type = node.get_element_type();
115-
OPENVINO_ASSERT(element_type.is_real(),
116-
"Clamp preprocessing can be applied to 'double' inputs. Consider using "
117-
"'convert_element_type' before clamping. Current type is: ",
118-
element_type);
119-
120114
auto clamp_op = std::make_shared<ov::op::v0::Clamp>(node, min_value, max_value);
121115
return std::make_tuple(std::vector<Output<Node>>{clamp_op}, true);
122116
},
@@ -717,12 +711,6 @@ void PostStepsList::add_clamp(double min_value, double max_value) {
717711

718712
m_actions.emplace_back(
719713
[min_value, max_value](const Output<Node>& node, PostprocessingContext& ctxt) {
720-
auto element_type = node.get_element_type();
721-
OPENVINO_ASSERT(element_type.is_real(),
722-
"Clamp postprocessing can be applied to 'double' inputs. Consider using "
723-
"'convert_element_type' before clamping. Current type is: ",
724-
element_type);
725-
726714
auto clamp_op = std::make_shared<ov::op::v0::Clamp>(node, min_value, max_value);
727715
return std::make_tuple(Output<Node>{clamp_op}, true);
728716
},

0 commit comments

Comments
 (0)