Пример #1
0
 public static Offset <tflite.Operator> CreateOperator(FlatBufferBuilder builder,
                                                       uint opcode_index          = 0,
                                                       VectorOffset inputsOffset  = default(VectorOffset),
                                                       VectorOffset outputsOffset = default(VectorOffset),
                                                       tflite.BuiltinOptions builtin_options_type = tflite.BuiltinOptions.NONE,
                                                       int builtin_optionsOffset         = 0,
                                                       VectorOffset custom_optionsOffset = default(VectorOffset),
                                                       tflite.CustomOptionsFormat custom_options_format = tflite.CustomOptionsFormat.FLEXBUFFERS,
                                                       VectorOffset mutating_variable_inputsOffset      = default(VectorOffset),
                                                       VectorOffset intermediatesOffset = default(VectorOffset))
 {
     builder.StartTable(9);
     Operator.AddIntermediates(builder, intermediatesOffset);
     Operator.AddMutatingVariableInputs(builder, mutating_variable_inputsOffset);
     Operator.AddCustomOptions(builder, custom_optionsOffset);
     Operator.AddBuiltinOptions(builder, builtin_optionsOffset);
     Operator.AddOutputs(builder, outputsOffset);
     Operator.AddInputs(builder, inputsOffset);
     Operator.AddOpcodeIndex(builder, opcode_index);
     Operator.AddCustomOptionsFormat(builder, custom_options_format);
     Operator.AddBuiltinOptionsType(builder, builtin_options_type);
     return(Operator.EndOperator(builder));
 }
Пример #2
0
 public static void AddBuiltinOptionsType(FlatBufferBuilder builder, tflite.BuiltinOptions builtinOptionsType)
 {
     builder.AddByte(3, (byte)builtinOptionsType, 0);
 }