23{
24 auto &operation = (*_operation);
25
26 assert(operation.has_conv2d_options());
27
28 const auto &conv2d_options = operation.conv2d_options();
29
32
33 tflite::Conv2DOptionsBuilder conv2d_options_builder{fbb};
34 conv2d_options_builder.add_padding(tflite_padding);
35 conv2d_options_builder.add_stride_h(conv2d_options.stride_h());
36 conv2d_options_builder.add_stride_w(conv2d_options.stride_w());
37 conv2d_options_builder.add_fused_activation_function(tflite_activation);
38 conv2d_options_builder.add_dilation_w_factor(conv2d_options.dilation_w_factor());
39 conv2d_options_builder.add_dilation_h_factor(conv2d_options.dilation_h_factor());
40
41 return conv2d_options_builder.
Finish().Union();
42}
void Finish(Offset< T > root, const char *file_identifier=nullptr)
Finish serializing a buffer by writing the root offset.
tflite::PaddingType tflite_padding(const PaddingType type)
tflite::ActivationFunctionType as_tflite_activation(const tflchef::Activation &value)
tflite::Padding as_tflite_padding(const tflchef::Padding &value)