Add a helper error message when the tensor index is not found.
PiperOrigin-RevId: 316155846 Change-Id: I0754d7520e9ee3ec352fd26691581ac05f2caa3e
This commit is contained in:
parent
0511d9fd95
commit
204f6a1c5d
@ -461,7 +461,7 @@ class SingleOpModel {
|
||||
std::vector<T> ExtractVector(int index) const {
|
||||
const T* v = interpreter_->typed_tensor<T>(index);
|
||||
const auto* tensor = interpreter_->tensor(index);
|
||||
CHECK(v);
|
||||
CHECK(v) << "Could not extract vector at index: " << index;
|
||||
int tensor_size;
|
||||
if (tensor->sparsity) {
|
||||
// Getting the size of the sparse buffer this way is based on the
|
||||
|
Loading…
Reference in New Issue
Block a user