25 tflchef::ModelRecipe *model_recipe)
const
30 for (int32_t index = 1; index <= 3; ++index)
32 const tflite::Tensor *tensor =
import->tensors()->Get(inputs[index]);
33 assert(tensor->type() == tflite::TensorType::TensorType_INT32);
34 const tflite::Buffer *buffer =
import->buffers()->Get(tensor->buffer());
35 auto vec = extract_buffer<int32_t>(buffer);
36 import->set_tensor_filler(inputs[index], vec);
42 tflchef::Operation *operation = ctx->
chefop;
43 const tflite::Operator *op = ctx->
tflop;
45 auto op_params = op->builtin_options_as_StridedSliceOptions();
46 assert(op_params !=
nullptr);
48 operation->set_type(
"StridedSlice");
50 auto op_options = operation->mutable_strided_slice_options();
52 op_options->set_begin_mask(op_params->begin_mask());
53 op_options->set_end_mask(op_params->end_mask());
54 op_options->set_ellipsis_mask(op_params->ellipsis_mask());
55 op_options->set_new_axis_mask(op_params->new_axis_mask());
56 op_options->set_shrink_axis_mask(op_params->shrink_axis_mask());
tflchef::Operation * chefop
const tflite::Operator * tflop