24 tflchef::ModelRecipe *model_recipe)
const
27 const auto &inputs = *op->inputs();
29 const tflite::Tensor *tensor =
import->tensors()->Get(inputs[1]);
30 assert(tensor->type() == tflite::TensorType::TensorType_INT32);
31 const tflite::Buffer *buffer =
import->buffers()->Get(tensor->buffer());
33 if (buffer && buffer->data())
35 auto vec = extract_buffer<int32_t>(buffer);
36 import->set_tensor_filler(inputs[1], vec);
40 for (int32_t index = 2; index <= 3; ++index)
42 const tflite::Tensor *tensor =
import->tensors()->Get(inputs[index]);
43 const tflite::Buffer *buffer =
import->buffers()->Get(tensor->buffer());
44 if (buffer && buffer->data())
46 switch (tensor->type())
48 case tflite::TensorType::TensorType_INT32:
50 auto vec = extract_buffer<int32_t>(buffer);
51 import->set_tensor_filler(inputs[index], vec);
55 case tflite::TensorType::TensorType_FLOAT32:
57 auto vec = extract_buffer<float>(buffer);
58 import->set_tensor_filler(inputs[index], vec);
tflchef::Operation * chefop
const tflite::Operator * tflop