25 circlechef::ModelRecipe *model_recipe)
const
29 import->set_tensor_filler(inputs[1]);
30 import->set_tensor_filler(inputs[3]);
32 const circle::Tensor *tensor2 =
import->tensors()->Get(inputs[2]);
33 assert(tensor2->type() == circle::TensorType::TensorType_INT32);
34 const circle::Buffer *buffer2 =
import->buffers()->Get(tensor2->buffer());
35 auto vec2 = extract_buffer<int32_t>(buffer2);
36 import->set_tensor_filler(inputs[2], vec2);
38 const circle::Tensor *tensor4 =
import->tensors()->Get(inputs[4]);
39 assert(tensor4->type() == circle::TensorType::TensorType_INT32);
40 const circle::Buffer *buffer4 =
import->buffers()->Get(tensor4->buffer());
41 auto vec4 = extract_buffer<int32_t>(buffer4);
42 import->set_tensor_filler(inputs[4], vec4);
47 circlechef::ModelRecipe *model_recipe)
const
49 auto op_params = op->builtin_options_as_BCQFullyConnectedOptions();
50 assert(op_params !=
nullptr);
52 auto operation = model_recipe->add_operation();
54 operation->set_type(
"BCQFullyConnected");
56 auto op_options = operation->mutable_bcq_fully_connected_options();
58 op_options->set_weights_hidden_size(op_params->weights_hidden_size());