diff options
-rw-r--r-- | reference_model/src/ops/data_nodes.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/reference_model/src/ops/data_nodes.cc b/reference_model/src/ops/data_nodes.cc index 07e7e97..705981c 100644 --- a/reference_model/src/ops/data_nodes.cc +++ b/reference_model/src/ops/data_nodes.cc @@ -38,6 +38,16 @@ int OpConst::checkTensorAttributes() int OpConst::eval() { + for (auto ct : getOutputs()) + { + if (!ct->getIsValid()) + { + std::string err = "Constant tensor " + ct->getName() + " not correctly initialized"; + printNodeValidationError(err.c_str()); + return 1; + } + } + // Evaluation is trivial for constants return GraphNode::eval(); } |