28 assert(context !=
nullptr);
30 const std::vector<int32_t> &inputs = op.inputs;
31 const std::vector<int32_t> &outputs = op.outputs;
34 assert(!tensors.null());
36 std::vector<CircleNode *> input_nodes;
37 for (
const int32_t input_tensor_index : inputs)
39 if (input_tensor_index >= 0)
43 INFO(l) <<
"[luci] Warning: input node is null " << input_tensor_index << std::endl;
44 input_nodes.push_back(input);
50 input_nodes.push_back(node);
57 assert(outputs.size() == 1);
59 const auto output_tensor = tensors[outputs[0]];
60 assert(output_tensor !=
nullptr);
63 if (output_tensor->shape() ==
nullptr)
69 assert(opcodes[op.opcode_index] !=
nullptr);
70 node->
op_version(opcodes[op.opcode_index]->version());
74 assert(outputs.size() == 1);
Class to store context to build loco graph IR from TensorFlow.
IndexNodeFinder * nodefinder()
void copy_tensor_attributes(const circle::Tensor *tensor, CircleNode *node)
Copy common tensor attributes such as name, type, etc. to node.