Do not use TfLitePtrUnion.uint8, it's deprecated; use .data instead.

PiperOrigin-RevId: 306493152
Change-Id: I1805afc68e4ffb37a076bec79e0e51eac9110336
This commit is contained in:
Robert David 2020-04-14 12:36:54 -07:00 committed by TensorFlower Gardener
parent 7d2ff41266
commit 60140d9369

View File

@ -83,10 +83,10 @@ TfLiteStatus AllocateVariables(
TfLiteTensor* runtime_tensors, SimpleMemoryAllocator* allocator) {
for (size_t i = 0; i < flatbuffer_tensors->size(); ++i) {
if (flatbuffer_tensors->Get(i)->is_variable()) {
runtime_tensors[i].data.uint8 = allocator->AllocateFromTail(
runtime_tensors[i].data.data = allocator->AllocateFromTail(
runtime_tensors[i].bytes, kBufferAlignment);
// Allocation failure.
if (runtime_tensors[i].data.uint8 == nullptr) {
if (runtime_tensors[i].data.data == nullptr) {
return kTfLiteError;
}
}