Lines Matching refs:tensor

123     TfLiteTensor* tensor = runner->input_tensor(name);  in findInputTensor()  local
124 LOG_ALWAYS_FATAL_IF(!tensor, "Failed to find input tensor '%s'", name); in findInputTensor()
125 return tensor; in findInputTensor()
130 const TfLiteTensor* tensor = runner->output_tensor(name); in findOutputTensor() local
131 LOG_ALWAYS_FATAL_IF(!tensor, "Failed to find output tensor '%s'", name); in findOutputTensor()
132 return tensor; in findOutputTensor()
138 TfLiteTensor*>::type tensor) { in getTensorBuffer() argument
139 LOG_ALWAYS_FATAL_IF(!tensor); in getTensorBuffer()
142 LOG_ALWAYS_FATAL_IF(tensor->type != type, "Unexpected type for '%s' tensor: %s (expected %s)", in getTensorBuffer()
143 tensor->name, TfLiteTypeGetName(tensor->type), TfLiteTypeGetName(type)); in getTensorBuffer()
145 LOG_ALWAYS_FATAL_IF(!tensor->data.data); in getTensorBuffer()
146 return std::span<T>(reinterpret_cast<T*>(tensor->data.data), tensor->bytes / sizeof(T)); in getTensorBuffer()
151 void checkTensor(const TfLiteTensor* tensor) { in checkTensor() argument
152 LOG_ALWAYS_FATAL_IF(!tensor); in checkTensor()
154 const auto buffer = getTensorBuffer<const T>(tensor); in checkTensor()
155 LOG_ALWAYS_FATAL_IF(buffer.empty(), "No buffer for tensor '%s'", tensor->name); in checkTensor()
335 const auto checkInputTensorSize = [this](const TfLiteTensor* tensor) { in allocateTensors() argument
336 const size_t size = getTensorBuffer<const float>(tensor).size(); in allocateTensors()
338 "Tensor '%s' length %zu does not match input length %zu", tensor->name, in allocateTensors()