MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TestGraphInfo

Class TestGraphInfo

tensorflow/lite/arena_planner_test.cc:128–149  ·  view source on GitHub ↗

The GraphInfo for a TestGraph.

Source from the content-addressed store, hash-verified

126
127// The GraphInfo for a TestGraph.
128class TestGraphInfo : public GraphInfo {
129 public:
130 explicit TestGraphInfo(TestGraph* graph) : graph_(graph) {}
131
132 size_t num_tensors() const override { return graph_->tensors()->size(); }
133 TfLiteTensor* tensor(size_t index) override {
134 return &graph_->tensors()->at(index);
135 }
136 size_t num_nodes() const override { return graph_->nodes().size(); }
137 const TfLiteNode& node(size_t index) const override {
138 return graph_->nodes()[index];
139 }
140 size_t node_index(size_t index) const override { return index; }
141 const std::vector<int>& inputs() const override { return graph_->inputs(); }
142 const std::vector<int>& outputs() const override { return graph_->outputs(); }
143 const std::vector<int>& variables() const override {
144 return graph_->variables();
145 }
146
147 private:
148 TestGraph* graph_;
149};
150
151void ReportError(TfLiteContext* context, const char* format, ...) {
152 const size_t kBufferSize = 1024;

Callers

nothing calls this directly

Calls 4

nodesMethod · 0.45
inputsMethod · 0.45
outputsMethod · 0.45
variablesMethod · 0.45

Tested by

no test coverage detected