diff options
Diffstat (limited to 'compiler/luci/import/src/Nodes/CircleLogicalNot.cpp')
-rw-r--r-- | compiler/luci/import/src/Nodes/CircleLogicalNot.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/luci/import/src/Nodes/CircleLogicalNot.cpp b/compiler/luci/import/src/Nodes/CircleLogicalNot.cpp index 3758642e4..43e9ed39f 100644 --- a/compiler/luci/import/src/Nodes/CircleLogicalNot.cpp +++ b/compiler/luci/import/src/Nodes/CircleLogicalNot.cpp @@ -25,14 +25,15 @@ namespace luci bool CircleLogicalNotGraphBuilder::validate(const ValidateArgs &args) const { - if (args.op.inputs.size() != 1) + if (!GraphBuilder::validate(args, 1)) return false; // Only BOOL type is allowed for the input const auto &inputs = args.op.inputs; - const auto &tensors = args.reader.tensors(); - const auto &tensor = tensors.at(inputs.at(0)); - if (tensor->type != circle::TensorType::TensorType_BOOL) + const auto tensors = args.reader.tensors(); + const auto tensor = tensors.at(inputs.at(0)); + assert(tensor != nullptr); + if (tensor->type() != circle::TensorType::TensorType_BOOL) return false; return true; |