#include <CircleIf.h>
Definition at line 25 of file CircleIf.h.
◆ validate()
bool luci::CircleIfGraphBuilder::validate |
( |
const ValidateArgs & |
args | ) |
const |
|
finalvirtual |
Implements luci::GraphBuilderBase.
Definition at line 28 of file CircleIf.cpp.
29{
31 const auto *
options =
args.op.builtin_options.AsIfOptions();
32
34 return false;
35 if (
args.op.outputs.size() < 1)
36 return false;
37
38 auto num_graphs =
static_cast<int32_t
>(
args.reader.num_subgraph());
39 if (
options->then_subgraph_index >= num_graphs)
40 return false;
41 if (
options->else_subgraph_index >= num_graphs)
42 return false;
43
44
45 const auto tensors =
args.reader.tensors();
47 assert(tensor != nullptr);
48 if (
tensor->type() != circle::TensorType_BOOL)
49 return false;
50
52 if (shape.size() != 1 && shape.size() != 0)
53 return false;
54
55 return true;
56}
VectorWrapper< T > wrap(const flatbuffers::Vector< T > *vec)
References luci::wrap().
The documentation for this class was generated from the following files: