Use element type instead of F32 for constants (#2121)

This commit is contained in:
Katarzyna Mitrus 2020-09-09 09:50:27 +02:00 committed by GitHub
parent b8a8fe7c0d
commit ddaceb047d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,10 +47,10 @@ namespace ngraph
data_shape[1].get_length());
const auto scale_const =
default_opset::Constant::create(element::f32, Shape{}, {scale});
default_opset::Constant::create(data.get_element_type(), Shape{}, {scale});
const auto bias_const =
default_opset::Constant::create(element::f32, {1, bias.size(), 1, 1}, bias);
const auto bias_const = default_opset::Constant::create(
data.get_element_type(), {1, bias.size(), 1, 1}, bias);
const auto scaler = std::make_shared<default_opset::Add>(
std::make_shared<default_opset::Multiply>(data, scale_const), bias_const);