diff --git a/src/frontends/paddle/src/op/assign_value.cpp b/src/frontends/paddle/src/op/assign_value.cpp index 82db4a3adedfb1..9d6f40d1470abf 100644 --- a/src/frontends/paddle/src/op/assign_value.cpp +++ b/src/frontends/paddle/src/op/assign_value.cpp @@ -31,7 +31,10 @@ NamedOutputs assign_value(const NodeContext& node) { const_node = {opset6::Constant::create(dtype, Shape{shape.begin(), shape.end()}, values)}; } else { auto values = node.get_attribute>("values"); - auto values_f32 = std::vector(values.begin(), values.end()); + std::vector values_f32(values.size()); + std::transform(values.begin(), values.end(), values_f32.begin(), [](double v) { + return static_cast(v); + }); const_node = {opset6::Constant::create(dtype, Shape{shape.begin(), shape.end()}, values_f32)}; } break; diff --git a/src/frontends/paddle/src/op/fill_constant.cpp b/src/frontends/paddle/src/op/fill_constant.cpp index ac5142e8a26dd8..69a09f522f38de 100644 --- a/src/frontends/paddle/src/op/fill_constant.cpp +++ b/src/frontends/paddle/src/op/fill_constant.cpp @@ -23,13 +23,14 @@ NamedOutputs fill_constant(const NodeContext& node) { int32_t value = static_cast(node.get_attribute("value")); value_node = opset6::Constant::create(dtype, {}, {value}); } else if (dtype == element::f16) { - float value = static_cast(node.get_attribute("value")); + float value = static_cast(node.get_attribute("value")); value_node = opset6::Constant::create(dtype, {}, {value}); } else if (dtype == element::f32) { float value = node.get_attribute("value"); value_node = opset6::Constant::create(dtype, {}, {value}); } else if (dtype == element::f64) { - float value = static_cast(node.get_attribute("value")); + float f32_value = node.get_attribute("value"); + double value = static_cast(f32_value); value_node = opset6::Constant::create(dtype, {}, {value}); } else if (dtype == element::i64) { int64_t value = static_cast(node.get_attribute("value"));