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

Method CheckSizes

tensorflow/lite/testing/test_runner.h:116–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114 // the test runner is invalidated and false is returned.
115 template <typename T>
116 bool CheckSizes(size_t tensor_bytes, size_t num_values) {
117 size_t num_tensor_elements = tensor_bytes / sizeof(T);
118 if (num_tensor_elements != num_values) {
119 Invalidate("Expected '" + std::to_string(num_tensor_elements) +
120 "' elements for a tensor, but only got '" +
121 std::to_string(num_values) + "'");
122 return false;
123 }
124 return true;
125 }
126
127 private:
128 string model_base_dir_;

Callers

nothing calls this directly

Calls 1

to_stringFunction · 0.85

Tested by

no test coverage detected