Commit 82ae6056 authored by Adam Procter's avatar Adam Procter Committed by Scott Cyphers

Fix bug with serialization of zero-element constants (#3026)

parent 3762538c
......@@ -1843,7 +1843,7 @@ static json write(const Node& n, bool binary_constant_data)
case OP_TYPEID::Constant:
{
auto tmp = dynamic_cast<const op::Constant*>(&n);
if (tmp->are_all_data_elements_bitwise_identical())
if (tmp->are_all_data_elements_bitwise_identical() && shape_size(tmp->get_shape()) > 0)
{
vector<string> vs;
vs.push_back(tmp->convert_value_to_string(0));
......
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