Commit 68e626b1 authored by gaurides's avatar gaurides Committed by Scott Cyphers

Backward compatibility for GenerateMask deserialize (#3057)

* Backward comptability for GenerateMask nbench

* PR feedback - use get_or_default
parent a809ed7f
......@@ -1015,12 +1015,7 @@ static shared_ptr<ngraph::Function>
auto type = read_element_type(node_js.at("type"));
auto seed = node_js.at("seed").get<unsigned int>();
auto probability = node_js.at("probability").get<double>();
auto use_seed_maybe = node_js.at("use_seed");
bool use_seed = false;
if (!use_seed_maybe.empty())
{
use_seed = use_seed_maybe.get<bool>();
}
bool use_seed = get_or_default<bool>(node_js, "use_seed", false);
node = make_shared<op::GenerateMask>(
args[0], output_shape, type, seed, probability, use_seed);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment