41 void prepare(
const tflite::SubGraph *graph);
43 const std::string &
name(uint32_t tensor_id) {
return _name_ctx[tensor_id]; }
45 const tflite::TensorType &
type(uint32_t tensor_id) {
return _type_ctx[tensor_id]; }
48 std::map<uint32_t, std::string> _name_ctx;
49 std::map<uint32_t, tensor::Shape> _shape_ctx;
50 std::map<uint32_t, tflite::TensorType> _type_ctx;
Class to store context to build IR from tflite.
GraphBuilderContext(GraphBuilderContext &&)=delete
GraphBuilderContext(coco::Module *m, coco::Data *d, coco::Block *block, TensorBags &tensor_bags, TensorContext &tensor_context, TflBufferContext &buffer_context, const tflite::SubGraph *graph)
GraphBuilderContext()=delete
TflBufferContext & buffer()
GraphBuilderContext(const GraphBuilderContext &)=delete
const tflite::SubGraph * graph()
Extracts and holds operand(tensor) information such as name, shape, and type.
void prepare(const tflite::SubGraph *graph)
const std::string & name(uint32_t tensor_id)
const tflite::TensorType & type(uint32_t tensor_id)
const tensor::Shape & shape(uint32_t tensor_id)
Class to read and provide buffer information of tflite.
TflBuffer< T > tensor_buffer(const tflite::SubGraph *graph, uint32_t tensor_idx) const
Class that holds operator codes and related methods.
tflite::BuiltinOperator builtin_code(const tflite::Operator *op) const
Returns BuiltinOperator value of the operator.
std::string opcode_name(const tflite::Operator *op) const
Returns human readable name of the operator code of the operator.
static bool is_custom(const tflite::OperatorCode *opcode)
static bool is_valid(const tflite::OperatorCode *opcode)
TflBuffer(const T *p, size_t s)