Add missing TfLiteFloat16 specialization to GetTensorData.

PiperOrigin-RevId: 259415502
This commit is contained in:
A. Unique TensorFlower 2019-07-22 15:08:27 -07:00 committed by TensorFlower Gardener
parent 6b0dba99c3
commit aca02856dd

View File

@ -28,6 +28,11 @@ inline float* GetTensorData(TfLiteTensor* tensor) {
return tensor != nullptr ? tensor->data.f : nullptr; return tensor != nullptr ? tensor->data.f : nullptr;
} }
template <>
inline TfLiteFloat16* GetTensorData(TfLiteTensor* tensor) {
return tensor != nullptr ? tensor->data.f16 : nullptr;
}
template <> template <>
inline uint8_t* GetTensorData(TfLiteTensor* tensor) { inline uint8_t* GetTensorData(TfLiteTensor* tensor) {
return tensor != nullptr ? tensor->data.uint8 : nullptr; return tensor != nullptr ? tensor->data.uint8 : nullptr;