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

Function IsConstantTensor

tensorflow/lite/tools/verifier.cc:198–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198bool IsConstantTensor(const Tensor& tensor, const Model& model) {
199 if (!tensor.buffer() || !model.buffers()) return false;
200 if (tensor.buffer() > 0 && tensor.buffer() < model.buffers()->size()) {
201 auto* buffer = model.buffers()->Get(tensor.buffer());
202 if (buffer && buffer->data()) {
203 return true;
204 }
205 }
206 return false;
207}
208
209// Performs basic consistency checks on a sub-graph.
210bool VerifySubGraphConsistency(const Model& model, const SubGraph& subgraph,

Callers 9

PrepareFunction · 0.50
EvalFunction · 0.50
ReadValueByTensorIdxMethod · 0.50
ParseMethod · 0.50
ParseMethod · 0.50
EvalFunction · 0.50

Calls 4

bufferMethod · 0.45
sizeMethod · 0.45
GetMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected