1 // automatically generated by the FlatBuffers compiler, do not modify
2
3
4 #ifndef FLATBUFFERS_GENERATED_CAFFEOP_MNN_H_
5 #define FLATBUFFERS_GENERATED_CAFFEOP_MNN_H_
6
7
8 #include "Tensor_generated.h"
9 #include "Type_generated.h"
10
11 namespace MNN {
12
13 struct Convolution2DCommon;
14 struct Convolution2DCommonT;
15
16 struct Convolution3DCommon;
17 struct Convolution3DCommonT;
18
19 struct SparseCommon;
20 struct SparseCommonT;
21
22 struct IDSTQuan;
23 struct IDSTQuanT;
24
25 struct QuantizedFloatParam;
26 struct QuantizedFloatParamT;
27
28 struct Convolution2D;
29 struct Convolution2DT;
30
31 struct Convolution3D;
32 struct Convolution3DT;
33
34 struct InnerProduct;
35 struct InnerProductT;
36
37 struct Pool;
38 struct PoolT;
39
40 struct Pool3D;
41 struct Pool3DT;
42
43 struct Relu;
44 struct ReluT;
45
46 struct Relu6;
47 struct Relu6T;
48
49 struct PRelu;
50 struct PReluT;
51
52 struct ELU;
53 struct ELUT;
54
55 struct LRN;
56 struct LRNT;
57
58 struct ArgMax;
59 struct ArgMaxT;
60
61 struct Axis;
62 struct AxisT;
63
64 struct Input;
65 struct InputT;
66
67 struct LSTM;
68 struct LSTMT;
69
70 struct Slice;
71 struct SliceT;
72
73 struct BatchNorm;
74 struct BatchNormT;
75
76 struct Scale;
77 struct ScaleT;
78
79 struct Eltwise;
80 struct EltwiseT;
81
82 struct Flatten;
83 struct FlattenT;
84
85 struct Permute;
86 struct PermuteT;
87
88 struct Reshape;
89 struct ReshapeT;
90
91 struct DetectionOutput;
92 struct DetectionOutputT;
93
94 struct RoiPooling;
95 struct RoiPoolingT;
96
97 struct Proposal;
98 struct ProposalT;
99
100 struct Interp;
101 struct InterpT;
102
103 struct Resize;
104 struct ResizeT;
105
106 struct PriorBox;
107 struct PriorBoxT;
108
109 struct Normalize;
110 struct NormalizeT;
111
112 struct EltwiseInt8;
113 struct EltwiseInt8T;
114
115 inline const flatbuffers::TypeTable *Convolution2DCommonTypeTable();
116
117 inline const flatbuffers::TypeTable *Convolution3DCommonTypeTable();
118
119 inline const flatbuffers::TypeTable *SparseCommonTypeTable();
120
121 inline const flatbuffers::TypeTable *IDSTQuanTypeTable();
122
123 inline const flatbuffers::TypeTable *QuantizedFloatParamTypeTable();
124
125 inline const flatbuffers::TypeTable *Convolution2DTypeTable();
126
127 inline const flatbuffers::TypeTable *Convolution3DTypeTable();
128
129 inline const flatbuffers::TypeTable *InnerProductTypeTable();
130
131 inline const flatbuffers::TypeTable *PoolTypeTable();
132
133 inline const flatbuffers::TypeTable *Pool3DTypeTable();
134
135 inline const flatbuffers::TypeTable *ReluTypeTable();
136
137 inline const flatbuffers::TypeTable *Relu6TypeTable();
138
139 inline const flatbuffers::TypeTable *PReluTypeTable();
140
141 inline const flatbuffers::TypeTable *ELUTypeTable();
142
143 inline const flatbuffers::TypeTable *LRNTypeTable();
144
145 inline const flatbuffers::TypeTable *ArgMaxTypeTable();
146
147 inline const flatbuffers::TypeTable *AxisTypeTable();
148
149 inline const flatbuffers::TypeTable *InputTypeTable();
150
151 inline const flatbuffers::TypeTable *LSTMTypeTable();
152
153 inline const flatbuffers::TypeTable *SliceTypeTable();
154
155 inline const flatbuffers::TypeTable *BatchNormTypeTable();
156
157 inline const flatbuffers::TypeTable *ScaleTypeTable();
158
159 inline const flatbuffers::TypeTable *EltwiseTypeTable();
160
161 inline const flatbuffers::TypeTable *FlattenTypeTable();
162
163 inline const flatbuffers::TypeTable *PermuteTypeTable();
164
165 inline const flatbuffers::TypeTable *ReshapeTypeTable();
166
167 inline const flatbuffers::TypeTable *DetectionOutputTypeTable();
168
169 inline const flatbuffers::TypeTable *RoiPoolingTypeTable();
170
171 inline const flatbuffers::TypeTable *ProposalTypeTable();
172
173 inline const flatbuffers::TypeTable *InterpTypeTable();
174
175 inline const flatbuffers::TypeTable *ResizeTypeTable();
176
177 inline const flatbuffers::TypeTable *PriorBoxTypeTable();
178
179 inline const flatbuffers::TypeTable *NormalizeTypeTable();
180
181 inline const flatbuffers::TypeTable *EltwiseInt8TypeTable();
182
183 enum PadMode {
184 PadMode_CAFFE = 0,
185 PadMode_VALID = 1,
186 PadMode_SAME = 2,
187 PadMode_MIN = PadMode_CAFFE,
188 PadMode_MAX = PadMode_SAME
189 };
190
EnumValuesPadMode()191 inline const PadMode (&EnumValuesPadMode())[3] {
192 static const PadMode values[] = {
193 PadMode_CAFFE,
194 PadMode_VALID,
195 PadMode_SAME
196 };
197 return values;
198 }
199
EnumNamesPadMode()200 inline const char * const *EnumNamesPadMode() {
201 static const char * const names[] = {
202 "CAFFE",
203 "VALID",
204 "SAME",
205 nullptr
206 };
207 return names;
208 }
209
EnumNamePadMode(PadMode e)210 inline const char *EnumNamePadMode(PadMode e) {
211 if (e < PadMode_CAFFE || e > PadMode_SAME) return "";
212 const size_t index = static_cast<int>(e);
213 return EnumNamesPadMode()[index];
214 }
215
216 enum SparseAlgo {
217 SparseAlgo_RANDOM = 0,
218 SparseAlgo_SIMD_OC = 1,
219 SparseAlgo_MIN = SparseAlgo_RANDOM,
220 SparseAlgo_MAX = SparseAlgo_SIMD_OC
221 };
222
EnumValuesSparseAlgo()223 inline const SparseAlgo (&EnumValuesSparseAlgo())[2] {
224 static const SparseAlgo values[] = {
225 SparseAlgo_RANDOM,
226 SparseAlgo_SIMD_OC
227 };
228 return values;
229 }
230
EnumNamesSparseAlgo()231 inline const char * const *EnumNamesSparseAlgo() {
232 static const char * const names[] = {
233 "RANDOM",
234 "SIMD_OC",
235 nullptr
236 };
237 return names;
238 }
239
EnumNameSparseAlgo(SparseAlgo e)240 inline const char *EnumNameSparseAlgo(SparseAlgo e) {
241 if (e < SparseAlgo_RANDOM || e > SparseAlgo_SIMD_OC) return "";
242 const size_t index = static_cast<int>(e);
243 return EnumNamesSparseAlgo()[index];
244 }
245
246 enum QuantizeAlgo {
247 QuantizeAlgo_DEFAULT = 0,
248 QuantizeAlgo_OVERFLOW_AWARE = 1,
249 QuantizeAlgo_WINOGRAD_AWARE = 2,
250 QuantizeAlgo_MIN = QuantizeAlgo_DEFAULT,
251 QuantizeAlgo_MAX = QuantizeAlgo_WINOGRAD_AWARE
252 };
253
EnumValuesQuantizeAlgo()254 inline const QuantizeAlgo (&EnumValuesQuantizeAlgo())[3] {
255 static const QuantizeAlgo values[] = {
256 QuantizeAlgo_DEFAULT,
257 QuantizeAlgo_OVERFLOW_AWARE,
258 QuantizeAlgo_WINOGRAD_AWARE
259 };
260 return values;
261 }
262
EnumNamesQuantizeAlgo()263 inline const char * const *EnumNamesQuantizeAlgo() {
264 static const char * const names[] = {
265 "DEFAULT",
266 "OVERFLOW_AWARE",
267 "WINOGRAD_AWARE",
268 nullptr
269 };
270 return names;
271 }
272
EnumNameQuantizeAlgo(QuantizeAlgo e)273 inline const char *EnumNameQuantizeAlgo(QuantizeAlgo e) {
274 if (e < QuantizeAlgo_DEFAULT || e > QuantizeAlgo_WINOGRAD_AWARE) return "";
275 const size_t index = static_cast<int>(e);
276 return EnumNamesQuantizeAlgo()[index];
277 }
278
279 enum PoolType {
280 PoolType_MAXPOOL = 0,
281 PoolType_AVEPOOL = 1,
282 PoolType_MIN = PoolType_MAXPOOL,
283 PoolType_MAX = PoolType_AVEPOOL
284 };
285
EnumValuesPoolType()286 inline const PoolType (&EnumValuesPoolType())[2] {
287 static const PoolType values[] = {
288 PoolType_MAXPOOL,
289 PoolType_AVEPOOL
290 };
291 return values;
292 }
293
EnumNamesPoolType()294 inline const char * const *EnumNamesPoolType() {
295 static const char * const names[] = {
296 "MAXPOOL",
297 "AVEPOOL",
298 nullptr
299 };
300 return names;
301 }
302
EnumNamePoolType(PoolType e)303 inline const char *EnumNamePoolType(PoolType e) {
304 if (e < PoolType_MAXPOOL || e > PoolType_AVEPOOL) return "";
305 const size_t index = static_cast<int>(e);
306 return EnumNamesPoolType()[index];
307 }
308
309 enum PoolPadType {
310 PoolPadType_CAFFE = 0,
311 PoolPadType_VALID = 1,
312 PoolPadType_SAME = 2,
313 PoolPadType_MIN = PoolPadType_CAFFE,
314 PoolPadType_MAX = PoolPadType_SAME
315 };
316
EnumValuesPoolPadType()317 inline const PoolPadType (&EnumValuesPoolPadType())[3] {
318 static const PoolPadType values[] = {
319 PoolPadType_CAFFE,
320 PoolPadType_VALID,
321 PoolPadType_SAME
322 };
323 return values;
324 }
325
EnumNamesPoolPadType()326 inline const char * const *EnumNamesPoolPadType() {
327 static const char * const names[] = {
328 "CAFFE",
329 "VALID",
330 "SAME",
331 nullptr
332 };
333 return names;
334 }
335
EnumNamePoolPadType(PoolPadType e)336 inline const char *EnumNamePoolPadType(PoolPadType e) {
337 if (e < PoolPadType_CAFFE || e > PoolPadType_SAME) return "";
338 const size_t index = static_cast<int>(e);
339 return EnumNamesPoolPadType()[index];
340 }
341
342 enum AvgPoolCountType {
343 AvgPoolCountType_DEFAULT = 0,
344 AvgPoolCountType_INCLUDE_PADDING = 1,
345 AvgPoolCountType_EXCLUDE_PADDING = 2,
346 AvgPoolCountType_MIN = AvgPoolCountType_DEFAULT,
347 AvgPoolCountType_MAX = AvgPoolCountType_EXCLUDE_PADDING
348 };
349
EnumValuesAvgPoolCountType()350 inline const AvgPoolCountType (&EnumValuesAvgPoolCountType())[3] {
351 static const AvgPoolCountType values[] = {
352 AvgPoolCountType_DEFAULT,
353 AvgPoolCountType_INCLUDE_PADDING,
354 AvgPoolCountType_EXCLUDE_PADDING
355 };
356 return values;
357 }
358
EnumNamesAvgPoolCountType()359 inline const char * const *EnumNamesAvgPoolCountType() {
360 static const char * const names[] = {
361 "DEFAULT",
362 "INCLUDE_PADDING",
363 "EXCLUDE_PADDING",
364 nullptr
365 };
366 return names;
367 }
368
EnumNameAvgPoolCountType(AvgPoolCountType e)369 inline const char *EnumNameAvgPoolCountType(AvgPoolCountType e) {
370 if (e < AvgPoolCountType_DEFAULT || e > AvgPoolCountType_EXCLUDE_PADDING) return "";
371 const size_t index = static_cast<int>(e);
372 return EnumNamesAvgPoolCountType()[index];
373 }
374
375 enum EltwiseType {
376 EltwiseType_PROD = 0,
377 EltwiseType_SUM = 1,
378 EltwiseType_MAXIMUM = 2,
379 EltwiseType_SUB = 3,
380 EltwiseType_MIN = EltwiseType_PROD,
381 EltwiseType_MAX = EltwiseType_SUB
382 };
383
EnumValuesEltwiseType()384 inline const EltwiseType (&EnumValuesEltwiseType())[4] {
385 static const EltwiseType values[] = {
386 EltwiseType_PROD,
387 EltwiseType_SUM,
388 EltwiseType_MAXIMUM,
389 EltwiseType_SUB
390 };
391 return values;
392 }
393
EnumNamesEltwiseType()394 inline const char * const *EnumNamesEltwiseType() {
395 static const char * const names[] = {
396 "PROD",
397 "SUM",
398 "MAXIMUM",
399 "SUB",
400 nullptr
401 };
402 return names;
403 }
404
EnumNameEltwiseType(EltwiseType e)405 inline const char *EnumNameEltwiseType(EltwiseType e) {
406 if (e < EltwiseType_PROD || e > EltwiseType_SUB) return "";
407 const size_t index = static_cast<int>(e);
408 return EnumNamesEltwiseType()[index];
409 }
410
411 enum CoordinateTransformationMode {
412 CoordinateTransformationMode_NotSet = 0,
413 CoordinateTransformationMode_AlignCorners = 1,
414 CoordinateTransformationMode_HalfPixels = 2,
415 CoordinateTransformationMode_PytorchHalfPixels = 3,
416 CoordinateTransformationMode_Asymmetric = 4,
417 CoordinateTransformationMode_TensorflowHalfPixels = 5,
418 CoordinateTransformationMode_TensorflowCropAndResize = 6,
419 CoordinateTransformationMode_MIN = CoordinateTransformationMode_NotSet,
420 CoordinateTransformationMode_MAX = CoordinateTransformationMode_TensorflowCropAndResize
421 };
422
EnumValuesCoordinateTransformationMode()423 inline const CoordinateTransformationMode (&EnumValuesCoordinateTransformationMode())[7] {
424 static const CoordinateTransformationMode values[] = {
425 CoordinateTransformationMode_NotSet,
426 CoordinateTransformationMode_AlignCorners,
427 CoordinateTransformationMode_HalfPixels,
428 CoordinateTransformationMode_PytorchHalfPixels,
429 CoordinateTransformationMode_Asymmetric,
430 CoordinateTransformationMode_TensorflowHalfPixels,
431 CoordinateTransformationMode_TensorflowCropAndResize
432 };
433 return values;
434 }
435
EnumNamesCoordinateTransformationMode()436 inline const char * const *EnumNamesCoordinateTransformationMode() {
437 static const char * const names[] = {
438 "NotSet",
439 "AlignCorners",
440 "HalfPixels",
441 "PytorchHalfPixels",
442 "Asymmetric",
443 "TensorflowHalfPixels",
444 "TensorflowCropAndResize",
445 nullptr
446 };
447 return names;
448 }
449
EnumNameCoordinateTransformationMode(CoordinateTransformationMode e)450 inline const char *EnumNameCoordinateTransformationMode(CoordinateTransformationMode e) {
451 if (e < CoordinateTransformationMode_NotSet || e > CoordinateTransformationMode_TensorflowCropAndResize) return "";
452 const size_t index = static_cast<int>(e);
453 return EnumNamesCoordinateTransformationMode()[index];
454 }
455
456 struct Convolution2DCommonT : public flatbuffers::NativeTable {
457 typedef Convolution2DCommon TableType;
458 int32_t padX;
459 int32_t padY;
460 int32_t kernelX;
461 int32_t kernelY;
462 int32_t strideX;
463 int32_t strideY;
464 int32_t dilateX;
465 int32_t dilateY;
466 PadMode padMode;
467 int32_t group;
468 int32_t outputCount;
469 int32_t inputCount;
470 bool relu;
471 bool relu6;
472 std::vector<int32_t> pads;
473 std::vector<int32_t> outPads;
474 bool hasOutputShape;
Convolution2DCommonTConvolution2DCommonT475 Convolution2DCommonT()
476 : padX(0),
477 padY(0),
478 kernelX(1),
479 kernelY(1),
480 strideX(1),
481 strideY(1),
482 dilateX(1),
483 dilateY(1),
484 padMode(PadMode_CAFFE),
485 group(1),
486 outputCount(0),
487 inputCount(0),
488 relu(false),
489 relu6(false),
490 hasOutputShape(false) {
491 }
492 };
493
494 struct Convolution2DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
495 typedef Convolution2DCommonT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS496 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
497 return Convolution2DCommonTypeTable();
498 }
padXFLATBUFFERS_FINAL_CLASS499 int32_t padX() const {
500 return GetField<int32_t>(4, 0);
501 }
padYFLATBUFFERS_FINAL_CLASS502 int32_t padY() const {
503 return GetField<int32_t>(6, 0);
504 }
kernelXFLATBUFFERS_FINAL_CLASS505 int32_t kernelX() const {
506 return GetField<int32_t>(8, 1);
507 }
kernelYFLATBUFFERS_FINAL_CLASS508 int32_t kernelY() const {
509 return GetField<int32_t>(10, 1);
510 }
strideXFLATBUFFERS_FINAL_CLASS511 int32_t strideX() const {
512 return GetField<int32_t>(12, 1);
513 }
strideYFLATBUFFERS_FINAL_CLASS514 int32_t strideY() const {
515 return GetField<int32_t>(14, 1);
516 }
dilateXFLATBUFFERS_FINAL_CLASS517 int32_t dilateX() const {
518 return GetField<int32_t>(16, 1);
519 }
dilateYFLATBUFFERS_FINAL_CLASS520 int32_t dilateY() const {
521 return GetField<int32_t>(18, 1);
522 }
padModeFLATBUFFERS_FINAL_CLASS523 PadMode padMode() const {
524 return static_cast<PadMode>(GetField<int8_t>(20, 0));
525 }
groupFLATBUFFERS_FINAL_CLASS526 int32_t group() const {
527 return GetField<int32_t>(22, 1);
528 }
outputCountFLATBUFFERS_FINAL_CLASS529 int32_t outputCount() const {
530 return GetField<int32_t>(24, 0);
531 }
inputCountFLATBUFFERS_FINAL_CLASS532 int32_t inputCount() const {
533 return GetField<int32_t>(26, 0);
534 }
reluFLATBUFFERS_FINAL_CLASS535 bool relu() const {
536 return GetField<uint8_t>(28, 0) != 0;
537 }
relu6FLATBUFFERS_FINAL_CLASS538 bool relu6() const {
539 return GetField<uint8_t>(30, 0) != 0;
540 }
padsFLATBUFFERS_FINAL_CLASS541 const flatbuffers::Vector<int32_t> *pads() const {
542 return GetPointer<const flatbuffers::Vector<int32_t> *>(32);
543 }
outPadsFLATBUFFERS_FINAL_CLASS544 const flatbuffers::Vector<int32_t> *outPads() const {
545 return GetPointer<const flatbuffers::Vector<int32_t> *>(34);
546 }
hasOutputShapeFLATBUFFERS_FINAL_CLASS547 bool hasOutputShape() const {
548 return GetField<uint8_t>(36, 0) != 0;
549 }
VerifyFLATBUFFERS_FINAL_CLASS550 bool Verify(flatbuffers::Verifier &verifier) const {
551 return VerifyTableStart(verifier) &&
552 VerifyField<int32_t>(verifier, 4) &&
553 VerifyField<int32_t>(verifier, 6) &&
554 VerifyField<int32_t>(verifier, 8) &&
555 VerifyField<int32_t>(verifier, 10) &&
556 VerifyField<int32_t>(verifier, 12) &&
557 VerifyField<int32_t>(verifier, 14) &&
558 VerifyField<int32_t>(verifier, 16) &&
559 VerifyField<int32_t>(verifier, 18) &&
560 VerifyField<int8_t>(verifier, 20) &&
561 VerifyField<int32_t>(verifier, 22) &&
562 VerifyField<int32_t>(verifier, 24) &&
563 VerifyField<int32_t>(verifier, 26) &&
564 VerifyField<uint8_t>(verifier, 28) &&
565 VerifyField<uint8_t>(verifier, 30) &&
566 VerifyOffset(verifier, 32) &&
567 verifier.VerifyVector(pads()) &&
568 VerifyOffset(verifier, 34) &&
569 verifier.VerifyVector(outPads()) &&
570 VerifyField<uint8_t>(verifier, 36) &&
571 verifier.EndTable();
572 }
573 Convolution2DCommonT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
574 void UnPackTo(Convolution2DCommonT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
575 static flatbuffers::Offset<Convolution2DCommon> Pack(flatbuffers::FlatBufferBuilder &_fbb, const Convolution2DCommonT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
576 };
577
578 struct Convolution2DCommonBuilder {
579 flatbuffers::FlatBufferBuilder &fbb_;
580 flatbuffers::uoffset_t start_;
add_padXConvolution2DCommonBuilder581 void add_padX(int32_t padX) {
582 fbb_.AddElement<int32_t>(4, padX, 0);
583 }
add_padYConvolution2DCommonBuilder584 void add_padY(int32_t padY) {
585 fbb_.AddElement<int32_t>(6, padY, 0);
586 }
add_kernelXConvolution2DCommonBuilder587 void add_kernelX(int32_t kernelX) {
588 fbb_.AddElement<int32_t>(8, kernelX, 1);
589 }
add_kernelYConvolution2DCommonBuilder590 void add_kernelY(int32_t kernelY) {
591 fbb_.AddElement<int32_t>(10, kernelY, 1);
592 }
add_strideXConvolution2DCommonBuilder593 void add_strideX(int32_t strideX) {
594 fbb_.AddElement<int32_t>(12, strideX, 1);
595 }
add_strideYConvolution2DCommonBuilder596 void add_strideY(int32_t strideY) {
597 fbb_.AddElement<int32_t>(14, strideY, 1);
598 }
add_dilateXConvolution2DCommonBuilder599 void add_dilateX(int32_t dilateX) {
600 fbb_.AddElement<int32_t>(16, dilateX, 1);
601 }
add_dilateYConvolution2DCommonBuilder602 void add_dilateY(int32_t dilateY) {
603 fbb_.AddElement<int32_t>(18, dilateY, 1);
604 }
add_padModeConvolution2DCommonBuilder605 void add_padMode(PadMode padMode) {
606 fbb_.AddElement<int8_t>(20, static_cast<int8_t>(padMode), 0);
607 }
add_groupConvolution2DCommonBuilder608 void add_group(int32_t group) {
609 fbb_.AddElement<int32_t>(22, group, 1);
610 }
add_outputCountConvolution2DCommonBuilder611 void add_outputCount(int32_t outputCount) {
612 fbb_.AddElement<int32_t>(24, outputCount, 0);
613 }
add_inputCountConvolution2DCommonBuilder614 void add_inputCount(int32_t inputCount) {
615 fbb_.AddElement<int32_t>(26, inputCount, 0);
616 }
add_reluConvolution2DCommonBuilder617 void add_relu(bool relu) {
618 fbb_.AddElement<uint8_t>(28, static_cast<uint8_t>(relu), 0);
619 }
add_relu6Convolution2DCommonBuilder620 void add_relu6(bool relu6) {
621 fbb_.AddElement<uint8_t>(30, static_cast<uint8_t>(relu6), 0);
622 }
add_padsConvolution2DCommonBuilder623 void add_pads(flatbuffers::Offset<flatbuffers::Vector<int32_t>> pads) {
624 fbb_.AddOffset(32, pads);
625 }
add_outPadsConvolution2DCommonBuilder626 void add_outPads(flatbuffers::Offset<flatbuffers::Vector<int32_t>> outPads) {
627 fbb_.AddOffset(34, outPads);
628 }
add_hasOutputShapeConvolution2DCommonBuilder629 void add_hasOutputShape(bool hasOutputShape) {
630 fbb_.AddElement<uint8_t>(36, static_cast<uint8_t>(hasOutputShape), 0);
631 }
Convolution2DCommonBuilderConvolution2DCommonBuilder632 explicit Convolution2DCommonBuilder(flatbuffers::FlatBufferBuilder &_fbb)
633 : fbb_(_fbb) {
634 start_ = fbb_.StartTable();
635 }
636 Convolution2DCommonBuilder &operator=(const Convolution2DCommonBuilder &);
FinishConvolution2DCommonBuilder637 flatbuffers::Offset<Convolution2DCommon> Finish() {
638 const auto end = fbb_.EndTable(start_);
639 auto o = flatbuffers::Offset<Convolution2DCommon>(end);
640 return o;
641 }
642 };
643
644 inline flatbuffers::Offset<Convolution2DCommon> CreateConvolution2DCommon(
645 flatbuffers::FlatBufferBuilder &_fbb,
646 int32_t padX = 0,
647 int32_t padY = 0,
648 int32_t kernelX = 1,
649 int32_t kernelY = 1,
650 int32_t strideX = 1,
651 int32_t strideY = 1,
652 int32_t dilateX = 1,
653 int32_t dilateY = 1,
654 PadMode padMode = PadMode_CAFFE,
655 int32_t group = 1,
656 int32_t outputCount = 0,
657 int32_t inputCount = 0,
658 bool relu = false,
659 bool relu6 = false,
660 flatbuffers::Offset<flatbuffers::Vector<int32_t>> pads = 0,
661 flatbuffers::Offset<flatbuffers::Vector<int32_t>> outPads = 0,
662 bool hasOutputShape = false) {
663 Convolution2DCommonBuilder builder_(_fbb);
664 builder_.add_outPads(outPads);
665 builder_.add_pads(pads);
666 builder_.add_inputCount(inputCount);
667 builder_.add_outputCount(outputCount);
668 builder_.add_group(group);
669 builder_.add_dilateY(dilateY);
670 builder_.add_dilateX(dilateX);
671 builder_.add_strideY(strideY);
672 builder_.add_strideX(strideX);
673 builder_.add_kernelY(kernelY);
674 builder_.add_kernelX(kernelX);
675 builder_.add_padY(padY);
676 builder_.add_padX(padX);
677 builder_.add_hasOutputShape(hasOutputShape);
678 builder_.add_relu6(relu6);
679 builder_.add_relu(relu);
680 builder_.add_padMode(padMode);
681 return builder_.Finish();
682 }
683
684 flatbuffers::Offset<Convolution2DCommon> CreateConvolution2DCommon(flatbuffers::FlatBufferBuilder &_fbb, const Convolution2DCommonT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
685
686 struct Convolution3DCommonT : public flatbuffers::NativeTable {
687 typedef Convolution3DCommon TableType;
688 std::vector<int32_t> dilates;
689 std::vector<int32_t> strides;
690 std::vector<int32_t> kernels;
691 std::vector<int32_t> pads;
692 PadMode padMode;
693 int32_t inputCount;
694 int32_t outputCount;
695 bool relu;
696 bool relu6;
Convolution3DCommonTConvolution3DCommonT697 Convolution3DCommonT()
698 : padMode(PadMode_CAFFE),
699 inputCount(0),
700 outputCount(0),
701 relu(false),
702 relu6(false) {
703 }
704 };
705
706 struct Convolution3DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
707 typedef Convolution3DCommonT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS708 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
709 return Convolution3DCommonTypeTable();
710 }
dilatesFLATBUFFERS_FINAL_CLASS711 const flatbuffers::Vector<int32_t> *dilates() const {
712 return GetPointer<const flatbuffers::Vector<int32_t> *>(4);
713 }
stridesFLATBUFFERS_FINAL_CLASS714 const flatbuffers::Vector<int32_t> *strides() const {
715 return GetPointer<const flatbuffers::Vector<int32_t> *>(6);
716 }
kernelsFLATBUFFERS_FINAL_CLASS717 const flatbuffers::Vector<int32_t> *kernels() const {
718 return GetPointer<const flatbuffers::Vector<int32_t> *>(8);
719 }
padsFLATBUFFERS_FINAL_CLASS720 const flatbuffers::Vector<int32_t> *pads() const {
721 return GetPointer<const flatbuffers::Vector<int32_t> *>(10);
722 }
padModeFLATBUFFERS_FINAL_CLASS723 PadMode padMode() const {
724 return static_cast<PadMode>(GetField<int8_t>(12, 0));
725 }
inputCountFLATBUFFERS_FINAL_CLASS726 int32_t inputCount() const {
727 return GetField<int32_t>(14, 0);
728 }
outputCountFLATBUFFERS_FINAL_CLASS729 int32_t outputCount() const {
730 return GetField<int32_t>(16, 0);
731 }
reluFLATBUFFERS_FINAL_CLASS732 bool relu() const {
733 return GetField<uint8_t>(18, 0) != 0;
734 }
relu6FLATBUFFERS_FINAL_CLASS735 bool relu6() const {
736 return GetField<uint8_t>(20, 0) != 0;
737 }
VerifyFLATBUFFERS_FINAL_CLASS738 bool Verify(flatbuffers::Verifier &verifier) const {
739 return VerifyTableStart(verifier) &&
740 VerifyOffset(verifier, 4) &&
741 verifier.VerifyVector(dilates()) &&
742 VerifyOffset(verifier, 6) &&
743 verifier.VerifyVector(strides()) &&
744 VerifyOffset(verifier, 8) &&
745 verifier.VerifyVector(kernels()) &&
746 VerifyOffset(verifier, 10) &&
747 verifier.VerifyVector(pads()) &&
748 VerifyField<int8_t>(verifier, 12) &&
749 VerifyField<int32_t>(verifier, 14) &&
750 VerifyField<int32_t>(verifier, 16) &&
751 VerifyField<uint8_t>(verifier, 18) &&
752 VerifyField<uint8_t>(verifier, 20) &&
753 verifier.EndTable();
754 }
755 Convolution3DCommonT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
756 void UnPackTo(Convolution3DCommonT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
757 static flatbuffers::Offset<Convolution3DCommon> Pack(flatbuffers::FlatBufferBuilder &_fbb, const Convolution3DCommonT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
758 };
759
760 struct Convolution3DCommonBuilder {
761 flatbuffers::FlatBufferBuilder &fbb_;
762 flatbuffers::uoffset_t start_;
add_dilatesConvolution3DCommonBuilder763 void add_dilates(flatbuffers::Offset<flatbuffers::Vector<int32_t>> dilates) {
764 fbb_.AddOffset(4, dilates);
765 }
add_stridesConvolution3DCommonBuilder766 void add_strides(flatbuffers::Offset<flatbuffers::Vector<int32_t>> strides) {
767 fbb_.AddOffset(6, strides);
768 }
add_kernelsConvolution3DCommonBuilder769 void add_kernels(flatbuffers::Offset<flatbuffers::Vector<int32_t>> kernels) {
770 fbb_.AddOffset(8, kernels);
771 }
add_padsConvolution3DCommonBuilder772 void add_pads(flatbuffers::Offset<flatbuffers::Vector<int32_t>> pads) {
773 fbb_.AddOffset(10, pads);
774 }
add_padModeConvolution3DCommonBuilder775 void add_padMode(PadMode padMode) {
776 fbb_.AddElement<int8_t>(12, static_cast<int8_t>(padMode), 0);
777 }
add_inputCountConvolution3DCommonBuilder778 void add_inputCount(int32_t inputCount) {
779 fbb_.AddElement<int32_t>(14, inputCount, 0);
780 }
add_outputCountConvolution3DCommonBuilder781 void add_outputCount(int32_t outputCount) {
782 fbb_.AddElement<int32_t>(16, outputCount, 0);
783 }
add_reluConvolution3DCommonBuilder784 void add_relu(bool relu) {
785 fbb_.AddElement<uint8_t>(18, static_cast<uint8_t>(relu), 0);
786 }
add_relu6Convolution3DCommonBuilder787 void add_relu6(bool relu6) {
788 fbb_.AddElement<uint8_t>(20, static_cast<uint8_t>(relu6), 0);
789 }
Convolution3DCommonBuilderConvolution3DCommonBuilder790 explicit Convolution3DCommonBuilder(flatbuffers::FlatBufferBuilder &_fbb)
791 : fbb_(_fbb) {
792 start_ = fbb_.StartTable();
793 }
794 Convolution3DCommonBuilder &operator=(const Convolution3DCommonBuilder &);
FinishConvolution3DCommonBuilder795 flatbuffers::Offset<Convolution3DCommon> Finish() {
796 const auto end = fbb_.EndTable(start_);
797 auto o = flatbuffers::Offset<Convolution3DCommon>(end);
798 return o;
799 }
800 };
801
802 inline flatbuffers::Offset<Convolution3DCommon> CreateConvolution3DCommon(
803 flatbuffers::FlatBufferBuilder &_fbb,
804 flatbuffers::Offset<flatbuffers::Vector<int32_t>> dilates = 0,
805 flatbuffers::Offset<flatbuffers::Vector<int32_t>> strides = 0,
806 flatbuffers::Offset<flatbuffers::Vector<int32_t>> kernels = 0,
807 flatbuffers::Offset<flatbuffers::Vector<int32_t>> pads = 0,
808 PadMode padMode = PadMode_CAFFE,
809 int32_t inputCount = 0,
810 int32_t outputCount = 0,
811 bool relu = false,
812 bool relu6 = false) {
813 Convolution3DCommonBuilder builder_(_fbb);
814 builder_.add_outputCount(outputCount);
815 builder_.add_inputCount(inputCount);
816 builder_.add_pads(pads);
817 builder_.add_kernels(kernels);
818 builder_.add_strides(strides);
819 builder_.add_dilates(dilates);
820 builder_.add_relu6(relu6);
821 builder_.add_relu(relu);
822 builder_.add_padMode(padMode);
823 return builder_.Finish();
824 }
825
826 flatbuffers::Offset<Convolution3DCommon> CreateConvolution3DCommon(flatbuffers::FlatBufferBuilder &_fbb, const Convolution3DCommonT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
827
828 struct SparseCommonT : public flatbuffers::NativeTable {
829 typedef SparseCommon TableType;
830 SparseAlgo method;
831 std::vector<std::unique_ptr<AttributeT>> args;
SparseCommonTSparseCommonT832 SparseCommonT()
833 : method(SparseAlgo_RANDOM) {
834 }
835 };
836
837 struct SparseCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
838 typedef SparseCommonT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS839 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
840 return SparseCommonTypeTable();
841 }
methodFLATBUFFERS_FINAL_CLASS842 SparseAlgo method() const {
843 return static_cast<SparseAlgo>(GetField<int8_t>(4, 0));
844 }
argsFLATBUFFERS_FINAL_CLASS845 const flatbuffers::Vector<flatbuffers::Offset<Attribute>> *args() const {
846 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<Attribute>> *>(6);
847 }
VerifyFLATBUFFERS_FINAL_CLASS848 bool Verify(flatbuffers::Verifier &verifier) const {
849 return VerifyTableStart(verifier) &&
850 VerifyField<int8_t>(verifier, 4) &&
851 VerifyOffset(verifier, 6) &&
852 verifier.VerifyVector(args()) &&
853 verifier.VerifyVectorOfTables(args()) &&
854 verifier.EndTable();
855 }
856 SparseCommonT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
857 void UnPackTo(SparseCommonT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
858 static flatbuffers::Offset<SparseCommon> Pack(flatbuffers::FlatBufferBuilder &_fbb, const SparseCommonT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
859 };
860
861 struct SparseCommonBuilder {
862 flatbuffers::FlatBufferBuilder &fbb_;
863 flatbuffers::uoffset_t start_;
add_methodSparseCommonBuilder864 void add_method(SparseAlgo method) {
865 fbb_.AddElement<int8_t>(4, static_cast<int8_t>(method), 0);
866 }
add_argsSparseCommonBuilder867 void add_args(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Attribute>>> args) {
868 fbb_.AddOffset(6, args);
869 }
SparseCommonBuilderSparseCommonBuilder870 explicit SparseCommonBuilder(flatbuffers::FlatBufferBuilder &_fbb)
871 : fbb_(_fbb) {
872 start_ = fbb_.StartTable();
873 }
874 SparseCommonBuilder &operator=(const SparseCommonBuilder &);
FinishSparseCommonBuilder875 flatbuffers::Offset<SparseCommon> Finish() {
876 const auto end = fbb_.EndTable(start_);
877 auto o = flatbuffers::Offset<SparseCommon>(end);
878 return o;
879 }
880 };
881
882 inline flatbuffers::Offset<SparseCommon> CreateSparseCommon(
883 flatbuffers::FlatBufferBuilder &_fbb,
884 SparseAlgo method = SparseAlgo_RANDOM,
885 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Attribute>>> args = 0) {
886 SparseCommonBuilder builder_(_fbb);
887 builder_.add_args(args);
888 builder_.add_method(method);
889 return builder_.Finish();
890 }
891
892 flatbuffers::Offset<SparseCommon> CreateSparseCommon(flatbuffers::FlatBufferBuilder &_fbb, const SparseCommonT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
893
894 struct IDSTQuanT : public flatbuffers::NativeTable {
895 typedef IDSTQuan TableType;
896 std::vector<int8_t> buffer;
897 std::vector<float> alpha;
898 int32_t type;
899 bool useInt32;
900 float quantScale;
901 float scaleIn;
902 float scaleOut;
903 int32_t aMax;
904 int32_t aMin;
905 int32_t readType;
906 bool has_scaleInt;
IDSTQuanTIDSTQuanT907 IDSTQuanT()
908 : type(0),
909 useInt32(false),
910 quantScale(0.0f),
911 scaleIn(0.0f),
912 scaleOut(0.0f),
913 aMax(0),
914 aMin(0),
915 readType(0),
916 has_scaleInt(false) {
917 }
918 };
919
920 struct IDSTQuan FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
921 typedef IDSTQuanT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS922 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
923 return IDSTQuanTypeTable();
924 }
bufferFLATBUFFERS_FINAL_CLASS925 const flatbuffers::Vector<int8_t> *buffer() const {
926 return GetPointer<const flatbuffers::Vector<int8_t> *>(4);
927 }
alphaFLATBUFFERS_FINAL_CLASS928 const flatbuffers::Vector<float> *alpha() const {
929 return GetPointer<const flatbuffers::Vector<float> *>(6);
930 }
typeFLATBUFFERS_FINAL_CLASS931 int32_t type() const {
932 return GetField<int32_t>(8, 0);
933 }
useInt32FLATBUFFERS_FINAL_CLASS934 bool useInt32() const {
935 return GetField<uint8_t>(10, 0) != 0;
936 }
quantScaleFLATBUFFERS_FINAL_CLASS937 float quantScale() const {
938 return GetField<float>(12, 0.0f);
939 }
scaleInFLATBUFFERS_FINAL_CLASS940 float scaleIn() const {
941 return GetField<float>(14, 0.0f);
942 }
scaleOutFLATBUFFERS_FINAL_CLASS943 float scaleOut() const {
944 return GetField<float>(16, 0.0f);
945 }
aMaxFLATBUFFERS_FINAL_CLASS946 int32_t aMax() const {
947 return GetField<int32_t>(18, 0);
948 }
aMinFLATBUFFERS_FINAL_CLASS949 int32_t aMin() const {
950 return GetField<int32_t>(20, 0);
951 }
readTypeFLATBUFFERS_FINAL_CLASS952 int32_t readType() const {
953 return GetField<int32_t>(22, 0);
954 }
has_scaleIntFLATBUFFERS_FINAL_CLASS955 bool has_scaleInt() const {
956 return GetField<uint8_t>(24, 0) != 0;
957 }
VerifyFLATBUFFERS_FINAL_CLASS958 bool Verify(flatbuffers::Verifier &verifier) const {
959 return VerifyTableStart(verifier) &&
960 VerifyOffset(verifier, 4) &&
961 verifier.VerifyVector(buffer()) &&
962 VerifyOffset(verifier, 6) &&
963 verifier.VerifyVector(alpha()) &&
964 VerifyField<int32_t>(verifier, 8) &&
965 VerifyField<uint8_t>(verifier, 10) &&
966 VerifyField<float>(verifier, 12) &&
967 VerifyField<float>(verifier, 14) &&
968 VerifyField<float>(verifier, 16) &&
969 VerifyField<int32_t>(verifier, 18) &&
970 VerifyField<int32_t>(verifier, 20) &&
971 VerifyField<int32_t>(verifier, 22) &&
972 VerifyField<uint8_t>(verifier, 24) &&
973 verifier.EndTable();
974 }
975 IDSTQuanT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
976 void UnPackTo(IDSTQuanT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
977 static flatbuffers::Offset<IDSTQuan> Pack(flatbuffers::FlatBufferBuilder &_fbb, const IDSTQuanT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
978 };
979
980 struct IDSTQuanBuilder {
981 flatbuffers::FlatBufferBuilder &fbb_;
982 flatbuffers::uoffset_t start_;
add_bufferIDSTQuanBuilder983 void add_buffer(flatbuffers::Offset<flatbuffers::Vector<int8_t>> buffer) {
984 fbb_.AddOffset(4, buffer);
985 }
add_alphaIDSTQuanBuilder986 void add_alpha(flatbuffers::Offset<flatbuffers::Vector<float>> alpha) {
987 fbb_.AddOffset(6, alpha);
988 }
add_typeIDSTQuanBuilder989 void add_type(int32_t type) {
990 fbb_.AddElement<int32_t>(8, type, 0);
991 }
add_useInt32IDSTQuanBuilder992 void add_useInt32(bool useInt32) {
993 fbb_.AddElement<uint8_t>(10, static_cast<uint8_t>(useInt32), 0);
994 }
add_quantScaleIDSTQuanBuilder995 void add_quantScale(float quantScale) {
996 fbb_.AddElement<float>(12, quantScale, 0.0f);
997 }
add_scaleInIDSTQuanBuilder998 void add_scaleIn(float scaleIn) {
999 fbb_.AddElement<float>(14, scaleIn, 0.0f);
1000 }
add_scaleOutIDSTQuanBuilder1001 void add_scaleOut(float scaleOut) {
1002 fbb_.AddElement<float>(16, scaleOut, 0.0f);
1003 }
add_aMaxIDSTQuanBuilder1004 void add_aMax(int32_t aMax) {
1005 fbb_.AddElement<int32_t>(18, aMax, 0);
1006 }
add_aMinIDSTQuanBuilder1007 void add_aMin(int32_t aMin) {
1008 fbb_.AddElement<int32_t>(20, aMin, 0);
1009 }
add_readTypeIDSTQuanBuilder1010 void add_readType(int32_t readType) {
1011 fbb_.AddElement<int32_t>(22, readType, 0);
1012 }
add_has_scaleIntIDSTQuanBuilder1013 void add_has_scaleInt(bool has_scaleInt) {
1014 fbb_.AddElement<uint8_t>(24, static_cast<uint8_t>(has_scaleInt), 0);
1015 }
IDSTQuanBuilderIDSTQuanBuilder1016 explicit IDSTQuanBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1017 : fbb_(_fbb) {
1018 start_ = fbb_.StartTable();
1019 }
1020 IDSTQuanBuilder &operator=(const IDSTQuanBuilder &);
FinishIDSTQuanBuilder1021 flatbuffers::Offset<IDSTQuan> Finish() {
1022 const auto end = fbb_.EndTable(start_);
1023 auto o = flatbuffers::Offset<IDSTQuan>(end);
1024 return o;
1025 }
1026 };
1027
1028 inline flatbuffers::Offset<IDSTQuan> CreateIDSTQuan(
1029 flatbuffers::FlatBufferBuilder &_fbb,
1030 flatbuffers::Offset<flatbuffers::Vector<int8_t>> buffer = 0,
1031 flatbuffers::Offset<flatbuffers::Vector<float>> alpha = 0,
1032 int32_t type = 0,
1033 bool useInt32 = false,
1034 float quantScale = 0.0f,
1035 float scaleIn = 0.0f,
1036 float scaleOut = 0.0f,
1037 int32_t aMax = 0,
1038 int32_t aMin = 0,
1039 int32_t readType = 0,
1040 bool has_scaleInt = false) {
1041 IDSTQuanBuilder builder_(_fbb);
1042 builder_.add_readType(readType);
1043 builder_.add_aMin(aMin);
1044 builder_.add_aMax(aMax);
1045 builder_.add_scaleOut(scaleOut);
1046 builder_.add_scaleIn(scaleIn);
1047 builder_.add_quantScale(quantScale);
1048 builder_.add_type(type);
1049 builder_.add_alpha(alpha);
1050 builder_.add_buffer(buffer);
1051 builder_.add_has_scaleInt(has_scaleInt);
1052 builder_.add_useInt32(useInt32);
1053 return builder_.Finish();
1054 }
1055
1056 flatbuffers::Offset<IDSTQuan> CreateIDSTQuan(flatbuffers::FlatBufferBuilder &_fbb, const IDSTQuanT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1057
1058 struct QuantizedFloatParamT : public flatbuffers::NativeTable {
1059 typedef QuantizedFloatParam TableType;
1060 std::vector<int8_t> weight;
1061 std::vector<int32_t> bias;
1062 std::vector<float> scale;
1063 std::vector<float> tensorScale;
1064 QuantizeAlgo method;
1065 int32_t nbits;
1066 int8_t zeroPoint;
1067 int8_t outputZeroPoint;
1068 int8_t clampMin;
1069 int8_t clampMax;
QuantizedFloatParamTQuantizedFloatParamT1070 QuantizedFloatParamT()
1071 : method(QuantizeAlgo_DEFAULT),
1072 nbits(8),
1073 zeroPoint(0),
1074 outputZeroPoint(0),
1075 clampMin(-128),
1076 clampMax(127) {
1077 }
1078 };
1079
1080 struct QuantizedFloatParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1081 typedef QuantizedFloatParamT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS1082 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
1083 return QuantizedFloatParamTypeTable();
1084 }
weightFLATBUFFERS_FINAL_CLASS1085 const flatbuffers::Vector<int8_t> *weight() const {
1086 return GetPointer<const flatbuffers::Vector<int8_t> *>(4);
1087 }
biasFLATBUFFERS_FINAL_CLASS1088 const flatbuffers::Vector<int32_t> *bias() const {
1089 return GetPointer<const flatbuffers::Vector<int32_t> *>(6);
1090 }
scaleFLATBUFFERS_FINAL_CLASS1091 const flatbuffers::Vector<float> *scale() const {
1092 return GetPointer<const flatbuffers::Vector<float> *>(8);
1093 }
tensorScaleFLATBUFFERS_FINAL_CLASS1094 const flatbuffers::Vector<float> *tensorScale() const {
1095 return GetPointer<const flatbuffers::Vector<float> *>(10);
1096 }
methodFLATBUFFERS_FINAL_CLASS1097 QuantizeAlgo method() const {
1098 return static_cast<QuantizeAlgo>(GetField<int8_t>(12, 0));
1099 }
nbitsFLATBUFFERS_FINAL_CLASS1100 int32_t nbits() const {
1101 return GetField<int32_t>(14, 8);
1102 }
zeroPointFLATBUFFERS_FINAL_CLASS1103 int8_t zeroPoint() const {
1104 return GetField<int8_t>(16, 0);
1105 }
outputZeroPointFLATBUFFERS_FINAL_CLASS1106 int8_t outputZeroPoint() const {
1107 return GetField<int8_t>(18, 0);
1108 }
clampMinFLATBUFFERS_FINAL_CLASS1109 int8_t clampMin() const {
1110 return GetField<int8_t>(20, -128);
1111 }
clampMaxFLATBUFFERS_FINAL_CLASS1112 int8_t clampMax() const {
1113 return GetField<int8_t>(22, 127);
1114 }
VerifyFLATBUFFERS_FINAL_CLASS1115 bool Verify(flatbuffers::Verifier &verifier) const {
1116 return VerifyTableStart(verifier) &&
1117 VerifyOffset(verifier, 4) &&
1118 verifier.VerifyVector(weight()) &&
1119 VerifyOffset(verifier, 6) &&
1120 verifier.VerifyVector(bias()) &&
1121 VerifyOffset(verifier, 8) &&
1122 verifier.VerifyVector(scale()) &&
1123 VerifyOffset(verifier, 10) &&
1124 verifier.VerifyVector(tensorScale()) &&
1125 VerifyField<int8_t>(verifier, 12) &&
1126 VerifyField<int32_t>(verifier, 14) &&
1127 VerifyField<int8_t>(verifier, 16) &&
1128 VerifyField<int8_t>(verifier, 18) &&
1129 VerifyField<int8_t>(verifier, 20) &&
1130 VerifyField<int8_t>(verifier, 22) &&
1131 verifier.EndTable();
1132 }
1133 QuantizedFloatParamT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1134 void UnPackTo(QuantizedFloatParamT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1135 static flatbuffers::Offset<QuantizedFloatParam> Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedFloatParamT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1136 };
1137
1138 struct QuantizedFloatParamBuilder {
1139 flatbuffers::FlatBufferBuilder &fbb_;
1140 flatbuffers::uoffset_t start_;
add_weightQuantizedFloatParamBuilder1141 void add_weight(flatbuffers::Offset<flatbuffers::Vector<int8_t>> weight) {
1142 fbb_.AddOffset(4, weight);
1143 }
add_biasQuantizedFloatParamBuilder1144 void add_bias(flatbuffers::Offset<flatbuffers::Vector<int32_t>> bias) {
1145 fbb_.AddOffset(6, bias);
1146 }
add_scaleQuantizedFloatParamBuilder1147 void add_scale(flatbuffers::Offset<flatbuffers::Vector<float>> scale) {
1148 fbb_.AddOffset(8, scale);
1149 }
add_tensorScaleQuantizedFloatParamBuilder1150 void add_tensorScale(flatbuffers::Offset<flatbuffers::Vector<float>> tensorScale) {
1151 fbb_.AddOffset(10, tensorScale);
1152 }
add_methodQuantizedFloatParamBuilder1153 void add_method(QuantizeAlgo method) {
1154 fbb_.AddElement<int8_t>(12, static_cast<int8_t>(method), 0);
1155 }
add_nbitsQuantizedFloatParamBuilder1156 void add_nbits(int32_t nbits) {
1157 fbb_.AddElement<int32_t>(14, nbits, 8);
1158 }
add_zeroPointQuantizedFloatParamBuilder1159 void add_zeroPoint(int8_t zeroPoint) {
1160 fbb_.AddElement<int8_t>(16, zeroPoint, 0);
1161 }
add_outputZeroPointQuantizedFloatParamBuilder1162 void add_outputZeroPoint(int8_t outputZeroPoint) {
1163 fbb_.AddElement<int8_t>(18, outputZeroPoint, 0);
1164 }
add_clampMinQuantizedFloatParamBuilder1165 void add_clampMin(int8_t clampMin) {
1166 fbb_.AddElement<int8_t>(20, clampMin, -128);
1167 }
add_clampMaxQuantizedFloatParamBuilder1168 void add_clampMax(int8_t clampMax) {
1169 fbb_.AddElement<int8_t>(22, clampMax, 127);
1170 }
QuantizedFloatParamBuilderQuantizedFloatParamBuilder1171 explicit QuantizedFloatParamBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1172 : fbb_(_fbb) {
1173 start_ = fbb_.StartTable();
1174 }
1175 QuantizedFloatParamBuilder &operator=(const QuantizedFloatParamBuilder &);
FinishQuantizedFloatParamBuilder1176 flatbuffers::Offset<QuantizedFloatParam> Finish() {
1177 const auto end = fbb_.EndTable(start_);
1178 auto o = flatbuffers::Offset<QuantizedFloatParam>(end);
1179 return o;
1180 }
1181 };
1182
1183 inline flatbuffers::Offset<QuantizedFloatParam> CreateQuantizedFloatParam(
1184 flatbuffers::FlatBufferBuilder &_fbb,
1185 flatbuffers::Offset<flatbuffers::Vector<int8_t>> weight = 0,
1186 flatbuffers::Offset<flatbuffers::Vector<int32_t>> bias = 0,
1187 flatbuffers::Offset<flatbuffers::Vector<float>> scale = 0,
1188 flatbuffers::Offset<flatbuffers::Vector<float>> tensorScale = 0,
1189 QuantizeAlgo method = QuantizeAlgo_DEFAULT,
1190 int32_t nbits = 8,
1191 int8_t zeroPoint = 0,
1192 int8_t outputZeroPoint = 0,
1193 int8_t clampMin = -128,
1194 int8_t clampMax = 127) {
1195 QuantizedFloatParamBuilder builder_(_fbb);
1196 builder_.add_nbits(nbits);
1197 builder_.add_tensorScale(tensorScale);
1198 builder_.add_scale(scale);
1199 builder_.add_bias(bias);
1200 builder_.add_weight(weight);
1201 builder_.add_clampMax(clampMax);
1202 builder_.add_clampMin(clampMin);
1203 builder_.add_outputZeroPoint(outputZeroPoint);
1204 builder_.add_zeroPoint(zeroPoint);
1205 builder_.add_method(method);
1206 return builder_.Finish();
1207 }
1208
1209 flatbuffers::Offset<QuantizedFloatParam> CreateQuantizedFloatParam(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedFloatParamT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1210
1211 struct Convolution2DT : public flatbuffers::NativeTable {
1212 typedef Convolution2D TableType;
1213 std::unique_ptr<Convolution2DCommonT> common;
1214 std::vector<float> weight;
1215 std::vector<float> bias;
1216 std::unique_ptr<IDSTQuanT> quanParameter;
1217 std::unique_ptr<QuantizedFloatParamT> symmetricQuan;
1218 std::unique_ptr<SparseCommonT> sparseParameter;
Convolution2DTConvolution2DT1219 Convolution2DT() {
1220 }
1221 };
1222
1223 struct Convolution2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1224 typedef Convolution2DT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS1225 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
1226 return Convolution2DTypeTable();
1227 }
commonFLATBUFFERS_FINAL_CLASS1228 const Convolution2DCommon *common() const {
1229 return GetPointer<const Convolution2DCommon *>(4);
1230 }
weightFLATBUFFERS_FINAL_CLASS1231 const flatbuffers::Vector<float> *weight() const {
1232 return GetPointer<const flatbuffers::Vector<float> *>(6);
1233 }
biasFLATBUFFERS_FINAL_CLASS1234 const flatbuffers::Vector<float> *bias() const {
1235 return GetPointer<const flatbuffers::Vector<float> *>(8);
1236 }
quanParameterFLATBUFFERS_FINAL_CLASS1237 const IDSTQuan *quanParameter() const {
1238 return GetPointer<const IDSTQuan *>(10);
1239 }
symmetricQuanFLATBUFFERS_FINAL_CLASS1240 const QuantizedFloatParam *symmetricQuan() const {
1241 return GetPointer<const QuantizedFloatParam *>(12);
1242 }
sparseParameterFLATBUFFERS_FINAL_CLASS1243 const SparseCommon *sparseParameter() const {
1244 return GetPointer<const SparseCommon *>(14);
1245 }
VerifyFLATBUFFERS_FINAL_CLASS1246 bool Verify(flatbuffers::Verifier &verifier) const {
1247 return VerifyTableStart(verifier) &&
1248 VerifyOffset(verifier, 4) &&
1249 verifier.VerifyTable(common()) &&
1250 VerifyOffset(verifier, 6) &&
1251 verifier.VerifyVector(weight()) &&
1252 VerifyOffset(verifier, 8) &&
1253 verifier.VerifyVector(bias()) &&
1254 VerifyOffset(verifier, 10) &&
1255 verifier.VerifyTable(quanParameter()) &&
1256 VerifyOffset(verifier, 12) &&
1257 verifier.VerifyTable(symmetricQuan()) &&
1258 VerifyOffset(verifier, 14) &&
1259 verifier.VerifyTable(sparseParameter()) &&
1260 verifier.EndTable();
1261 }
1262 Convolution2DT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1263 void UnPackTo(Convolution2DT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1264 static flatbuffers::Offset<Convolution2D> Pack(flatbuffers::FlatBufferBuilder &_fbb, const Convolution2DT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1265 };
1266
1267 struct Convolution2DBuilder {
1268 flatbuffers::FlatBufferBuilder &fbb_;
1269 flatbuffers::uoffset_t start_;
add_commonConvolution2DBuilder1270 void add_common(flatbuffers::Offset<Convolution2DCommon> common) {
1271 fbb_.AddOffset(4, common);
1272 }
add_weightConvolution2DBuilder1273 void add_weight(flatbuffers::Offset<flatbuffers::Vector<float>> weight) {
1274 fbb_.AddOffset(6, weight);
1275 }
add_biasConvolution2DBuilder1276 void add_bias(flatbuffers::Offset<flatbuffers::Vector<float>> bias) {
1277 fbb_.AddOffset(8, bias);
1278 }
add_quanParameterConvolution2DBuilder1279 void add_quanParameter(flatbuffers::Offset<IDSTQuan> quanParameter) {
1280 fbb_.AddOffset(10, quanParameter);
1281 }
add_symmetricQuanConvolution2DBuilder1282 void add_symmetricQuan(flatbuffers::Offset<QuantizedFloatParam> symmetricQuan) {
1283 fbb_.AddOffset(12, symmetricQuan);
1284 }
add_sparseParameterConvolution2DBuilder1285 void add_sparseParameter(flatbuffers::Offset<SparseCommon> sparseParameter) {
1286 fbb_.AddOffset(14, sparseParameter);
1287 }
Convolution2DBuilderConvolution2DBuilder1288 explicit Convolution2DBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1289 : fbb_(_fbb) {
1290 start_ = fbb_.StartTable();
1291 }
1292 Convolution2DBuilder &operator=(const Convolution2DBuilder &);
FinishConvolution2DBuilder1293 flatbuffers::Offset<Convolution2D> Finish() {
1294 const auto end = fbb_.EndTable(start_);
1295 auto o = flatbuffers::Offset<Convolution2D>(end);
1296 return o;
1297 }
1298 };
1299
1300 inline flatbuffers::Offset<Convolution2D> CreateConvolution2D(
1301 flatbuffers::FlatBufferBuilder &_fbb,
1302 flatbuffers::Offset<Convolution2DCommon> common = 0,
1303 flatbuffers::Offset<flatbuffers::Vector<float>> weight = 0,
1304 flatbuffers::Offset<flatbuffers::Vector<float>> bias = 0,
1305 flatbuffers::Offset<IDSTQuan> quanParameter = 0,
1306 flatbuffers::Offset<QuantizedFloatParam> symmetricQuan = 0,
1307 flatbuffers::Offset<SparseCommon> sparseParameter = 0) {
1308 Convolution2DBuilder builder_(_fbb);
1309 builder_.add_sparseParameter(sparseParameter);
1310 builder_.add_symmetricQuan(symmetricQuan);
1311 builder_.add_quanParameter(quanParameter);
1312 builder_.add_bias(bias);
1313 builder_.add_weight(weight);
1314 builder_.add_common(common);
1315 return builder_.Finish();
1316 }
1317
1318 flatbuffers::Offset<Convolution2D> CreateConvolution2D(flatbuffers::FlatBufferBuilder &_fbb, const Convolution2DT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1319
1320 struct Convolution3DT : public flatbuffers::NativeTable {
1321 typedef Convolution3D TableType;
1322 std::unique_ptr<Convolution3DCommonT> common;
1323 std::vector<float> weight;
1324 std::vector<float> bias;
Convolution3DTConvolution3DT1325 Convolution3DT() {
1326 }
1327 };
1328
1329 struct Convolution3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1330 typedef Convolution3DT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS1331 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
1332 return Convolution3DTypeTable();
1333 }
commonFLATBUFFERS_FINAL_CLASS1334 const Convolution3DCommon *common() const {
1335 return GetPointer<const Convolution3DCommon *>(4);
1336 }
weightFLATBUFFERS_FINAL_CLASS1337 const flatbuffers::Vector<float> *weight() const {
1338 return GetPointer<const flatbuffers::Vector<float> *>(6);
1339 }
biasFLATBUFFERS_FINAL_CLASS1340 const flatbuffers::Vector<float> *bias() const {
1341 return GetPointer<const flatbuffers::Vector<float> *>(8);
1342 }
VerifyFLATBUFFERS_FINAL_CLASS1343 bool Verify(flatbuffers::Verifier &verifier) const {
1344 return VerifyTableStart(verifier) &&
1345 VerifyOffset(verifier, 4) &&
1346 verifier.VerifyTable(common()) &&
1347 VerifyOffset(verifier, 6) &&
1348 verifier.VerifyVector(weight()) &&
1349 VerifyOffset(verifier, 8) &&
1350 verifier.VerifyVector(bias()) &&
1351 verifier.EndTable();
1352 }
1353 Convolution3DT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1354 void UnPackTo(Convolution3DT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1355 static flatbuffers::Offset<Convolution3D> Pack(flatbuffers::FlatBufferBuilder &_fbb, const Convolution3DT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1356 };
1357
1358 struct Convolution3DBuilder {
1359 flatbuffers::FlatBufferBuilder &fbb_;
1360 flatbuffers::uoffset_t start_;
add_commonConvolution3DBuilder1361 void add_common(flatbuffers::Offset<Convolution3DCommon> common) {
1362 fbb_.AddOffset(4, common);
1363 }
add_weightConvolution3DBuilder1364 void add_weight(flatbuffers::Offset<flatbuffers::Vector<float>> weight) {
1365 fbb_.AddOffset(6, weight);
1366 }
add_biasConvolution3DBuilder1367 void add_bias(flatbuffers::Offset<flatbuffers::Vector<float>> bias) {
1368 fbb_.AddOffset(8, bias);
1369 }
Convolution3DBuilderConvolution3DBuilder1370 explicit Convolution3DBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1371 : fbb_(_fbb) {
1372 start_ = fbb_.StartTable();
1373 }
1374 Convolution3DBuilder &operator=(const Convolution3DBuilder &);
FinishConvolution3DBuilder1375 flatbuffers::Offset<Convolution3D> Finish() {
1376 const auto end = fbb_.EndTable(start_);
1377 auto o = flatbuffers::Offset<Convolution3D>(end);
1378 return o;
1379 }
1380 };
1381
1382 inline flatbuffers::Offset<Convolution3D> CreateConvolution3D(
1383 flatbuffers::FlatBufferBuilder &_fbb,
1384 flatbuffers::Offset<Convolution3DCommon> common = 0,
1385 flatbuffers::Offset<flatbuffers::Vector<float>> weight = 0,
1386 flatbuffers::Offset<flatbuffers::Vector<float>> bias = 0) {
1387 Convolution3DBuilder builder_(_fbb);
1388 builder_.add_bias(bias);
1389 builder_.add_weight(weight);
1390 builder_.add_common(common);
1391 return builder_.Finish();
1392 }
1393
1394 flatbuffers::Offset<Convolution3D> CreateConvolution3D(flatbuffers::FlatBufferBuilder &_fbb, const Convolution3DT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1395
1396 struct InnerProductT : public flatbuffers::NativeTable {
1397 typedef InnerProduct TableType;
1398 int32_t outputCount;
1399 int32_t biasTerm;
1400 int32_t weightSize;
1401 std::vector<float> weight;
1402 std::vector<float> bias;
1403 int32_t axis;
1404 bool transpose;
1405 std::unique_ptr<IDSTQuanT> quanParameter;
InnerProductTInnerProductT1406 InnerProductT()
1407 : outputCount(0),
1408 biasTerm(0),
1409 weightSize(0),
1410 axis(0),
1411 transpose(false) {
1412 }
1413 };
1414
1415 struct InnerProduct FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1416 typedef InnerProductT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS1417 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
1418 return InnerProductTypeTable();
1419 }
outputCountFLATBUFFERS_FINAL_CLASS1420 int32_t outputCount() const {
1421 return GetField<int32_t>(4, 0);
1422 }
biasTermFLATBUFFERS_FINAL_CLASS1423 int32_t biasTerm() const {
1424 return GetField<int32_t>(6, 0);
1425 }
weightSizeFLATBUFFERS_FINAL_CLASS1426 int32_t weightSize() const {
1427 return GetField<int32_t>(8, 0);
1428 }
weightFLATBUFFERS_FINAL_CLASS1429 const flatbuffers::Vector<float> *weight() const {
1430 return GetPointer<const flatbuffers::Vector<float> *>(10);
1431 }
biasFLATBUFFERS_FINAL_CLASS1432 const flatbuffers::Vector<float> *bias() const {
1433 return GetPointer<const flatbuffers::Vector<float> *>(12);
1434 }
axisFLATBUFFERS_FINAL_CLASS1435 int32_t axis() const {
1436 return GetField<int32_t>(14, 0);
1437 }
transposeFLATBUFFERS_FINAL_CLASS1438 bool transpose() const {
1439 return GetField<uint8_t>(16, 0) != 0;
1440 }
quanParameterFLATBUFFERS_FINAL_CLASS1441 const IDSTQuan *quanParameter() const {
1442 return GetPointer<const IDSTQuan *>(18);
1443 }
VerifyFLATBUFFERS_FINAL_CLASS1444 bool Verify(flatbuffers::Verifier &verifier) const {
1445 return VerifyTableStart(verifier) &&
1446 VerifyField<int32_t>(verifier, 4) &&
1447 VerifyField<int32_t>(verifier, 6) &&
1448 VerifyField<int32_t>(verifier, 8) &&
1449 VerifyOffset(verifier, 10) &&
1450 verifier.VerifyVector(weight()) &&
1451 VerifyOffset(verifier, 12) &&
1452 verifier.VerifyVector(bias()) &&
1453 VerifyField<int32_t>(verifier, 14) &&
1454 VerifyField<uint8_t>(verifier, 16) &&
1455 VerifyOffset(verifier, 18) &&
1456 verifier.VerifyTable(quanParameter()) &&
1457 verifier.EndTable();
1458 }
1459 InnerProductT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1460 void UnPackTo(InnerProductT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1461 static flatbuffers::Offset<InnerProduct> Pack(flatbuffers::FlatBufferBuilder &_fbb, const InnerProductT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1462 };
1463
1464 struct InnerProductBuilder {
1465 flatbuffers::FlatBufferBuilder &fbb_;
1466 flatbuffers::uoffset_t start_;
add_outputCountInnerProductBuilder1467 void add_outputCount(int32_t outputCount) {
1468 fbb_.AddElement<int32_t>(4, outputCount, 0);
1469 }
add_biasTermInnerProductBuilder1470 void add_biasTerm(int32_t biasTerm) {
1471 fbb_.AddElement<int32_t>(6, biasTerm, 0);
1472 }
add_weightSizeInnerProductBuilder1473 void add_weightSize(int32_t weightSize) {
1474 fbb_.AddElement<int32_t>(8, weightSize, 0);
1475 }
add_weightInnerProductBuilder1476 void add_weight(flatbuffers::Offset<flatbuffers::Vector<float>> weight) {
1477 fbb_.AddOffset(10, weight);
1478 }
add_biasInnerProductBuilder1479 void add_bias(flatbuffers::Offset<flatbuffers::Vector<float>> bias) {
1480 fbb_.AddOffset(12, bias);
1481 }
add_axisInnerProductBuilder1482 void add_axis(int32_t axis) {
1483 fbb_.AddElement<int32_t>(14, axis, 0);
1484 }
add_transposeInnerProductBuilder1485 void add_transpose(bool transpose) {
1486 fbb_.AddElement<uint8_t>(16, static_cast<uint8_t>(transpose), 0);
1487 }
add_quanParameterInnerProductBuilder1488 void add_quanParameter(flatbuffers::Offset<IDSTQuan> quanParameter) {
1489 fbb_.AddOffset(18, quanParameter);
1490 }
InnerProductBuilderInnerProductBuilder1491 explicit InnerProductBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1492 : fbb_(_fbb) {
1493 start_ = fbb_.StartTable();
1494 }
1495 InnerProductBuilder &operator=(const InnerProductBuilder &);
FinishInnerProductBuilder1496 flatbuffers::Offset<InnerProduct> Finish() {
1497 const auto end = fbb_.EndTable(start_);
1498 auto o = flatbuffers::Offset<InnerProduct>(end);
1499 return o;
1500 }
1501 };
1502
1503 inline flatbuffers::Offset<InnerProduct> CreateInnerProduct(
1504 flatbuffers::FlatBufferBuilder &_fbb,
1505 int32_t outputCount = 0,
1506 int32_t biasTerm = 0,
1507 int32_t weightSize = 0,
1508 flatbuffers::Offset<flatbuffers::Vector<float>> weight = 0,
1509 flatbuffers::Offset<flatbuffers::Vector<float>> bias = 0,
1510 int32_t axis = 0,
1511 bool transpose = false,
1512 flatbuffers::Offset<IDSTQuan> quanParameter = 0) {
1513 InnerProductBuilder builder_(_fbb);
1514 builder_.add_quanParameter(quanParameter);
1515 builder_.add_axis(axis);
1516 builder_.add_bias(bias);
1517 builder_.add_weight(weight);
1518 builder_.add_weightSize(weightSize);
1519 builder_.add_biasTerm(biasTerm);
1520 builder_.add_outputCount(outputCount);
1521 builder_.add_transpose(transpose);
1522 return builder_.Finish();
1523 }
1524
1525 flatbuffers::Offset<InnerProduct> CreateInnerProduct(flatbuffers::FlatBufferBuilder &_fbb, const InnerProductT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1526
1527 struct PoolT : public flatbuffers::NativeTable {
1528 typedef Pool TableType;
1529 int32_t padX;
1530 int32_t padY;
1531 bool isGlobal;
1532 int32_t kernelX;
1533 int32_t kernelY;
1534 int32_t strideX;
1535 int32_t strideY;
1536 PoolType type;
1537 PoolPadType padType;
1538 DataType dataType;
1539 bool ceilModel;
1540 std::vector<int32_t> pads;
1541 AvgPoolCountType countType;
PoolTPoolT1542 PoolT()
1543 : padX(0),
1544 padY(0),
1545 isGlobal(false),
1546 kernelX(0),
1547 kernelY(0),
1548 strideX(0),
1549 strideY(0),
1550 type(PoolType_MAXPOOL),
1551 padType(PoolPadType_CAFFE),
1552 dataType(DataType_DT_FLOAT),
1553 ceilModel(true),
1554 countType(AvgPoolCountType_DEFAULT) {
1555 }
1556 };
1557
1558 struct Pool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1559 typedef PoolT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS1560 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
1561 return PoolTypeTable();
1562 }
padXFLATBUFFERS_FINAL_CLASS1563 int32_t padX() const {
1564 return GetField<int32_t>(4, 0);
1565 }
padYFLATBUFFERS_FINAL_CLASS1566 int32_t padY() const {
1567 return GetField<int32_t>(6, 0);
1568 }
isGlobalFLATBUFFERS_FINAL_CLASS1569 bool isGlobal() const {
1570 return GetField<uint8_t>(8, 0) != 0;
1571 }
kernelXFLATBUFFERS_FINAL_CLASS1572 int32_t kernelX() const {
1573 return GetField<int32_t>(10, 0);
1574 }
kernelYFLATBUFFERS_FINAL_CLASS1575 int32_t kernelY() const {
1576 return GetField<int32_t>(12, 0);
1577 }
strideXFLATBUFFERS_FINAL_CLASS1578 int32_t strideX() const {
1579 return GetField<int32_t>(14, 0);
1580 }
strideYFLATBUFFERS_FINAL_CLASS1581 int32_t strideY() const {
1582 return GetField<int32_t>(16, 0);
1583 }
typeFLATBUFFERS_FINAL_CLASS1584 PoolType type() const {
1585 return static_cast<PoolType>(GetField<int8_t>(18, 0));
1586 }
padTypeFLATBUFFERS_FINAL_CLASS1587 PoolPadType padType() const {
1588 return static_cast<PoolPadType>(GetField<int8_t>(20, 0));
1589 }
dataTypeFLATBUFFERS_FINAL_CLASS1590 DataType dataType() const {
1591 return static_cast<DataType>(GetField<int32_t>(22, 1));
1592 }
ceilModelFLATBUFFERS_FINAL_CLASS1593 bool ceilModel() const {
1594 return GetField<uint8_t>(24, 1) != 0;
1595 }
padsFLATBUFFERS_FINAL_CLASS1596 const flatbuffers::Vector<int32_t> *pads() const {
1597 return GetPointer<const flatbuffers::Vector<int32_t> *>(26);
1598 }
countTypeFLATBUFFERS_FINAL_CLASS1599 AvgPoolCountType countType() const {
1600 return static_cast<AvgPoolCountType>(GetField<int8_t>(28, 0));
1601 }
VerifyFLATBUFFERS_FINAL_CLASS1602 bool Verify(flatbuffers::Verifier &verifier) const {
1603 return VerifyTableStart(verifier) &&
1604 VerifyField<int32_t>(verifier, 4) &&
1605 VerifyField<int32_t>(verifier, 6) &&
1606 VerifyField<uint8_t>(verifier, 8) &&
1607 VerifyField<int32_t>(verifier, 10) &&
1608 VerifyField<int32_t>(verifier, 12) &&
1609 VerifyField<int32_t>(verifier, 14) &&
1610 VerifyField<int32_t>(verifier, 16) &&
1611 VerifyField<int8_t>(verifier, 18) &&
1612 VerifyField<int8_t>(verifier, 20) &&
1613 VerifyField<int32_t>(verifier, 22) &&
1614 VerifyField<uint8_t>(verifier, 24) &&
1615 VerifyOffset(verifier, 26) &&
1616 verifier.VerifyVector(pads()) &&
1617 VerifyField<int8_t>(verifier, 28) &&
1618 verifier.EndTable();
1619 }
1620 PoolT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1621 void UnPackTo(PoolT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1622 static flatbuffers::Offset<Pool> Pack(flatbuffers::FlatBufferBuilder &_fbb, const PoolT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1623 };
1624
1625 struct PoolBuilder {
1626 flatbuffers::FlatBufferBuilder &fbb_;
1627 flatbuffers::uoffset_t start_;
add_padXPoolBuilder1628 void add_padX(int32_t padX) {
1629 fbb_.AddElement<int32_t>(4, padX, 0);
1630 }
add_padYPoolBuilder1631 void add_padY(int32_t padY) {
1632 fbb_.AddElement<int32_t>(6, padY, 0);
1633 }
add_isGlobalPoolBuilder1634 void add_isGlobal(bool isGlobal) {
1635 fbb_.AddElement<uint8_t>(8, static_cast<uint8_t>(isGlobal), 0);
1636 }
add_kernelXPoolBuilder1637 void add_kernelX(int32_t kernelX) {
1638 fbb_.AddElement<int32_t>(10, kernelX, 0);
1639 }
add_kernelYPoolBuilder1640 void add_kernelY(int32_t kernelY) {
1641 fbb_.AddElement<int32_t>(12, kernelY, 0);
1642 }
add_strideXPoolBuilder1643 void add_strideX(int32_t strideX) {
1644 fbb_.AddElement<int32_t>(14, strideX, 0);
1645 }
add_strideYPoolBuilder1646 void add_strideY(int32_t strideY) {
1647 fbb_.AddElement<int32_t>(16, strideY, 0);
1648 }
add_typePoolBuilder1649 void add_type(PoolType type) {
1650 fbb_.AddElement<int8_t>(18, static_cast<int8_t>(type), 0);
1651 }
add_padTypePoolBuilder1652 void add_padType(PoolPadType padType) {
1653 fbb_.AddElement<int8_t>(20, static_cast<int8_t>(padType), 0);
1654 }
add_dataTypePoolBuilder1655 void add_dataType(DataType dataType) {
1656 fbb_.AddElement<int32_t>(22, static_cast<int32_t>(dataType), 1);
1657 }
add_ceilModelPoolBuilder1658 void add_ceilModel(bool ceilModel) {
1659 fbb_.AddElement<uint8_t>(24, static_cast<uint8_t>(ceilModel), 1);
1660 }
add_padsPoolBuilder1661 void add_pads(flatbuffers::Offset<flatbuffers::Vector<int32_t>> pads) {
1662 fbb_.AddOffset(26, pads);
1663 }
add_countTypePoolBuilder1664 void add_countType(AvgPoolCountType countType) {
1665 fbb_.AddElement<int8_t>(28, static_cast<int8_t>(countType), 0);
1666 }
PoolBuilderPoolBuilder1667 explicit PoolBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1668 : fbb_(_fbb) {
1669 start_ = fbb_.StartTable();
1670 }
1671 PoolBuilder &operator=(const PoolBuilder &);
FinishPoolBuilder1672 flatbuffers::Offset<Pool> Finish() {
1673 const auto end = fbb_.EndTable(start_);
1674 auto o = flatbuffers::Offset<Pool>(end);
1675 return o;
1676 }
1677 };
1678
1679 inline flatbuffers::Offset<Pool> CreatePool(
1680 flatbuffers::FlatBufferBuilder &_fbb,
1681 int32_t padX = 0,
1682 int32_t padY = 0,
1683 bool isGlobal = false,
1684 int32_t kernelX = 0,
1685 int32_t kernelY = 0,
1686 int32_t strideX = 0,
1687 int32_t strideY = 0,
1688 PoolType type = PoolType_MAXPOOL,
1689 PoolPadType padType = PoolPadType_CAFFE,
1690 DataType dataType = DataType_DT_FLOAT,
1691 bool ceilModel = true,
1692 flatbuffers::Offset<flatbuffers::Vector<int32_t>> pads = 0,
1693 AvgPoolCountType countType = AvgPoolCountType_DEFAULT) {
1694 PoolBuilder builder_(_fbb);
1695 builder_.add_pads(pads);
1696 builder_.add_dataType(dataType);
1697 builder_.add_strideY(strideY);
1698 builder_.add_strideX(strideX);
1699 builder_.add_kernelY(kernelY);
1700 builder_.add_kernelX(kernelX);
1701 builder_.add_padY(padY);
1702 builder_.add_padX(padX);
1703 builder_.add_countType(countType);
1704 builder_.add_ceilModel(ceilModel);
1705 builder_.add_padType(padType);
1706 builder_.add_type(type);
1707 builder_.add_isGlobal(isGlobal);
1708 return builder_.Finish();
1709 }
1710
1711 flatbuffers::Offset<Pool> CreatePool(flatbuffers::FlatBufferBuilder &_fbb, const PoolT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1712
1713 struct Pool3DT : public flatbuffers::NativeTable {
1714 typedef Pool3D TableType;
1715 std::vector<int32_t> strides;
1716 std::vector<int32_t> kernels;
1717 std::vector<int32_t> pads;
1718 PoolType type;
1719 PoolPadType padType;
1720 bool isGlobal;
Pool3DTPool3DT1721 Pool3DT()
1722 : type(PoolType_MAXPOOL),
1723 padType(PoolPadType_CAFFE),
1724 isGlobal(false) {
1725 }
1726 };
1727
1728 struct Pool3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1729 typedef Pool3DT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS1730 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
1731 return Pool3DTypeTable();
1732 }
stridesFLATBUFFERS_FINAL_CLASS1733 const flatbuffers::Vector<int32_t> *strides() const {
1734 return GetPointer<const flatbuffers::Vector<int32_t> *>(4);
1735 }
kernelsFLATBUFFERS_FINAL_CLASS1736 const flatbuffers::Vector<int32_t> *kernels() const {
1737 return GetPointer<const flatbuffers::Vector<int32_t> *>(6);
1738 }
padsFLATBUFFERS_FINAL_CLASS1739 const flatbuffers::Vector<int32_t> *pads() const {
1740 return GetPointer<const flatbuffers::Vector<int32_t> *>(8);
1741 }
typeFLATBUFFERS_FINAL_CLASS1742 PoolType type() const {
1743 return static_cast<PoolType>(GetField<int8_t>(10, 0));
1744 }
padTypeFLATBUFFERS_FINAL_CLASS1745 PoolPadType padType() const {
1746 return static_cast<PoolPadType>(GetField<int8_t>(12, 0));
1747 }
isGlobalFLATBUFFERS_FINAL_CLASS1748 bool isGlobal() const {
1749 return GetField<uint8_t>(14, 0) != 0;
1750 }
VerifyFLATBUFFERS_FINAL_CLASS1751 bool Verify(flatbuffers::Verifier &verifier) const {
1752 return VerifyTableStart(verifier) &&
1753 VerifyOffset(verifier, 4) &&
1754 verifier.VerifyVector(strides()) &&
1755 VerifyOffset(verifier, 6) &&
1756 verifier.VerifyVector(kernels()) &&
1757 VerifyOffset(verifier, 8) &&
1758 verifier.VerifyVector(pads()) &&
1759 VerifyField<int8_t>(verifier, 10) &&
1760 VerifyField<int8_t>(verifier, 12) &&
1761 VerifyField<uint8_t>(verifier, 14) &&
1762 verifier.EndTable();
1763 }
1764 Pool3DT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1765 void UnPackTo(Pool3DT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1766 static flatbuffers::Offset<Pool3D> Pack(flatbuffers::FlatBufferBuilder &_fbb, const Pool3DT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1767 };
1768
1769 struct Pool3DBuilder {
1770 flatbuffers::FlatBufferBuilder &fbb_;
1771 flatbuffers::uoffset_t start_;
add_stridesPool3DBuilder1772 void add_strides(flatbuffers::Offset<flatbuffers::Vector<int32_t>> strides) {
1773 fbb_.AddOffset(4, strides);
1774 }
add_kernelsPool3DBuilder1775 void add_kernels(flatbuffers::Offset<flatbuffers::Vector<int32_t>> kernels) {
1776 fbb_.AddOffset(6, kernels);
1777 }
add_padsPool3DBuilder1778 void add_pads(flatbuffers::Offset<flatbuffers::Vector<int32_t>> pads) {
1779 fbb_.AddOffset(8, pads);
1780 }
add_typePool3DBuilder1781 void add_type(PoolType type) {
1782 fbb_.AddElement<int8_t>(10, static_cast<int8_t>(type), 0);
1783 }
add_padTypePool3DBuilder1784 void add_padType(PoolPadType padType) {
1785 fbb_.AddElement<int8_t>(12, static_cast<int8_t>(padType), 0);
1786 }
add_isGlobalPool3DBuilder1787 void add_isGlobal(bool isGlobal) {
1788 fbb_.AddElement<uint8_t>(14, static_cast<uint8_t>(isGlobal), 0);
1789 }
Pool3DBuilderPool3DBuilder1790 explicit Pool3DBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1791 : fbb_(_fbb) {
1792 start_ = fbb_.StartTable();
1793 }
1794 Pool3DBuilder &operator=(const Pool3DBuilder &);
FinishPool3DBuilder1795 flatbuffers::Offset<Pool3D> Finish() {
1796 const auto end = fbb_.EndTable(start_);
1797 auto o = flatbuffers::Offset<Pool3D>(end);
1798 return o;
1799 }
1800 };
1801
1802 inline flatbuffers::Offset<Pool3D> CreatePool3D(
1803 flatbuffers::FlatBufferBuilder &_fbb,
1804 flatbuffers::Offset<flatbuffers::Vector<int32_t>> strides = 0,
1805 flatbuffers::Offset<flatbuffers::Vector<int32_t>> kernels = 0,
1806 flatbuffers::Offset<flatbuffers::Vector<int32_t>> pads = 0,
1807 PoolType type = PoolType_MAXPOOL,
1808 PoolPadType padType = PoolPadType_CAFFE,
1809 bool isGlobal = false) {
1810 Pool3DBuilder builder_(_fbb);
1811 builder_.add_pads(pads);
1812 builder_.add_kernels(kernels);
1813 builder_.add_strides(strides);
1814 builder_.add_isGlobal(isGlobal);
1815 builder_.add_padType(padType);
1816 builder_.add_type(type);
1817 return builder_.Finish();
1818 }
1819
1820 flatbuffers::Offset<Pool3D> CreatePool3D(flatbuffers::FlatBufferBuilder &_fbb, const Pool3DT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1821
1822 struct ReluT : public flatbuffers::NativeTable {
1823 typedef Relu TableType;
1824 float slope;
ReluTReluT1825 ReluT()
1826 : slope(0.0f) {
1827 }
1828 };
1829
1830 struct Relu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1831 typedef ReluT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS1832 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
1833 return ReluTypeTable();
1834 }
slopeFLATBUFFERS_FINAL_CLASS1835 float slope() const {
1836 return GetField<float>(4, 0.0f);
1837 }
VerifyFLATBUFFERS_FINAL_CLASS1838 bool Verify(flatbuffers::Verifier &verifier) const {
1839 return VerifyTableStart(verifier) &&
1840 VerifyField<float>(verifier, 4) &&
1841 verifier.EndTable();
1842 }
1843 ReluT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1844 void UnPackTo(ReluT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1845 static flatbuffers::Offset<Relu> Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReluT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1846 };
1847
1848 struct ReluBuilder {
1849 flatbuffers::FlatBufferBuilder &fbb_;
1850 flatbuffers::uoffset_t start_;
add_slopeReluBuilder1851 void add_slope(float slope) {
1852 fbb_.AddElement<float>(4, slope, 0.0f);
1853 }
ReluBuilderReluBuilder1854 explicit ReluBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1855 : fbb_(_fbb) {
1856 start_ = fbb_.StartTable();
1857 }
1858 ReluBuilder &operator=(const ReluBuilder &);
FinishReluBuilder1859 flatbuffers::Offset<Relu> Finish() {
1860 const auto end = fbb_.EndTable(start_);
1861 auto o = flatbuffers::Offset<Relu>(end);
1862 return o;
1863 }
1864 };
1865
1866 inline flatbuffers::Offset<Relu> CreateRelu(
1867 flatbuffers::FlatBufferBuilder &_fbb,
1868 float slope = 0.0f) {
1869 ReluBuilder builder_(_fbb);
1870 builder_.add_slope(slope);
1871 return builder_.Finish();
1872 }
1873
1874 flatbuffers::Offset<Relu> CreateRelu(flatbuffers::FlatBufferBuilder &_fbb, const ReluT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1875
1876 struct Relu6T : public flatbuffers::NativeTable {
1877 typedef Relu6 TableType;
1878 float minValue;
1879 float maxValue;
Relu6TRelu6T1880 Relu6T()
1881 : minValue(0.0f),
1882 maxValue(6.0f) {
1883 }
1884 };
1885
1886 struct Relu6 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1887 typedef Relu6T NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS1888 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
1889 return Relu6TypeTable();
1890 }
minValueFLATBUFFERS_FINAL_CLASS1891 float minValue() const {
1892 return GetField<float>(4, 0.0f);
1893 }
maxValueFLATBUFFERS_FINAL_CLASS1894 float maxValue() const {
1895 return GetField<float>(6, 6.0f);
1896 }
VerifyFLATBUFFERS_FINAL_CLASS1897 bool Verify(flatbuffers::Verifier &verifier) const {
1898 return VerifyTableStart(verifier) &&
1899 VerifyField<float>(verifier, 4) &&
1900 VerifyField<float>(verifier, 6) &&
1901 verifier.EndTable();
1902 }
1903 Relu6T *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1904 void UnPackTo(Relu6T *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1905 static flatbuffers::Offset<Relu6> Pack(flatbuffers::FlatBufferBuilder &_fbb, const Relu6T* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1906 };
1907
1908 struct Relu6Builder {
1909 flatbuffers::FlatBufferBuilder &fbb_;
1910 flatbuffers::uoffset_t start_;
add_minValueRelu6Builder1911 void add_minValue(float minValue) {
1912 fbb_.AddElement<float>(4, minValue, 0.0f);
1913 }
add_maxValueRelu6Builder1914 void add_maxValue(float maxValue) {
1915 fbb_.AddElement<float>(6, maxValue, 6.0f);
1916 }
Relu6BuilderRelu6Builder1917 explicit Relu6Builder(flatbuffers::FlatBufferBuilder &_fbb)
1918 : fbb_(_fbb) {
1919 start_ = fbb_.StartTable();
1920 }
1921 Relu6Builder &operator=(const Relu6Builder &);
FinishRelu6Builder1922 flatbuffers::Offset<Relu6> Finish() {
1923 const auto end = fbb_.EndTable(start_);
1924 auto o = flatbuffers::Offset<Relu6>(end);
1925 return o;
1926 }
1927 };
1928
1929 inline flatbuffers::Offset<Relu6> CreateRelu6(
1930 flatbuffers::FlatBufferBuilder &_fbb,
1931 float minValue = 0.0f,
1932 float maxValue = 6.0f) {
1933 Relu6Builder builder_(_fbb);
1934 builder_.add_maxValue(maxValue);
1935 builder_.add_minValue(minValue);
1936 return builder_.Finish();
1937 }
1938
1939 flatbuffers::Offset<Relu6> CreateRelu6(flatbuffers::FlatBufferBuilder &_fbb, const Relu6T *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1940
1941 struct PReluT : public flatbuffers::NativeTable {
1942 typedef PRelu TableType;
1943 int32_t slopeCount;
1944 std::vector<float> slope;
PReluTPReluT1945 PReluT()
1946 : slopeCount(0) {
1947 }
1948 };
1949
1950 struct PRelu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1951 typedef PReluT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS1952 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
1953 return PReluTypeTable();
1954 }
slopeCountFLATBUFFERS_FINAL_CLASS1955 int32_t slopeCount() const {
1956 return GetField<int32_t>(4, 0);
1957 }
slopeFLATBUFFERS_FINAL_CLASS1958 const flatbuffers::Vector<float> *slope() const {
1959 return GetPointer<const flatbuffers::Vector<float> *>(6);
1960 }
VerifyFLATBUFFERS_FINAL_CLASS1961 bool Verify(flatbuffers::Verifier &verifier) const {
1962 return VerifyTableStart(verifier) &&
1963 VerifyField<int32_t>(verifier, 4) &&
1964 VerifyOffset(verifier, 6) &&
1965 verifier.VerifyVector(slope()) &&
1966 verifier.EndTable();
1967 }
1968 PReluT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1969 void UnPackTo(PReluT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1970 static flatbuffers::Offset<PRelu> Pack(flatbuffers::FlatBufferBuilder &_fbb, const PReluT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1971 };
1972
1973 struct PReluBuilder {
1974 flatbuffers::FlatBufferBuilder &fbb_;
1975 flatbuffers::uoffset_t start_;
add_slopeCountPReluBuilder1976 void add_slopeCount(int32_t slopeCount) {
1977 fbb_.AddElement<int32_t>(4, slopeCount, 0);
1978 }
add_slopePReluBuilder1979 void add_slope(flatbuffers::Offset<flatbuffers::Vector<float>> slope) {
1980 fbb_.AddOffset(6, slope);
1981 }
PReluBuilderPReluBuilder1982 explicit PReluBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1983 : fbb_(_fbb) {
1984 start_ = fbb_.StartTable();
1985 }
1986 PReluBuilder &operator=(const PReluBuilder &);
FinishPReluBuilder1987 flatbuffers::Offset<PRelu> Finish() {
1988 const auto end = fbb_.EndTable(start_);
1989 auto o = flatbuffers::Offset<PRelu>(end);
1990 return o;
1991 }
1992 };
1993
1994 inline flatbuffers::Offset<PRelu> CreatePRelu(
1995 flatbuffers::FlatBufferBuilder &_fbb,
1996 int32_t slopeCount = 0,
1997 flatbuffers::Offset<flatbuffers::Vector<float>> slope = 0) {
1998 PReluBuilder builder_(_fbb);
1999 builder_.add_slope(slope);
2000 builder_.add_slopeCount(slopeCount);
2001 return builder_.Finish();
2002 }
2003
2004 flatbuffers::Offset<PRelu> CreatePRelu(flatbuffers::FlatBufferBuilder &_fbb, const PReluT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2005
2006 struct ELUT : public flatbuffers::NativeTable {
2007 typedef ELU TableType;
2008 float alpha;
ELUTELUT2009 ELUT()
2010 : alpha(0.0f) {
2011 }
2012 };
2013
2014 struct ELU FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2015 typedef ELUT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS2016 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
2017 return ELUTypeTable();
2018 }
alphaFLATBUFFERS_FINAL_CLASS2019 float alpha() const {
2020 return GetField<float>(4, 0.0f);
2021 }
VerifyFLATBUFFERS_FINAL_CLASS2022 bool Verify(flatbuffers::Verifier &verifier) const {
2023 return VerifyTableStart(verifier) &&
2024 VerifyField<float>(verifier, 4) &&
2025 verifier.EndTable();
2026 }
2027 ELUT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2028 void UnPackTo(ELUT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2029 static flatbuffers::Offset<ELU> Pack(flatbuffers::FlatBufferBuilder &_fbb, const ELUT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2030 };
2031
2032 struct ELUBuilder {
2033 flatbuffers::FlatBufferBuilder &fbb_;
2034 flatbuffers::uoffset_t start_;
add_alphaELUBuilder2035 void add_alpha(float alpha) {
2036 fbb_.AddElement<float>(4, alpha, 0.0f);
2037 }
ELUBuilderELUBuilder2038 explicit ELUBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2039 : fbb_(_fbb) {
2040 start_ = fbb_.StartTable();
2041 }
2042 ELUBuilder &operator=(const ELUBuilder &);
FinishELUBuilder2043 flatbuffers::Offset<ELU> Finish() {
2044 const auto end = fbb_.EndTable(start_);
2045 auto o = flatbuffers::Offset<ELU>(end);
2046 return o;
2047 }
2048 };
2049
2050 inline flatbuffers::Offset<ELU> CreateELU(
2051 flatbuffers::FlatBufferBuilder &_fbb,
2052 float alpha = 0.0f) {
2053 ELUBuilder builder_(_fbb);
2054 builder_.add_alpha(alpha);
2055 return builder_.Finish();
2056 }
2057
2058 flatbuffers::Offset<ELU> CreateELU(flatbuffers::FlatBufferBuilder &_fbb, const ELUT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2059
2060 struct LRNT : public flatbuffers::NativeTable {
2061 typedef LRN TableType;
2062 int32_t regionType;
2063 int32_t localSize;
2064 float alpha;
2065 float beta;
LRNTLRNT2066 LRNT()
2067 : regionType(0),
2068 localSize(0),
2069 alpha(0.0f),
2070 beta(0.0f) {
2071 }
2072 };
2073
2074 struct LRN FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2075 typedef LRNT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS2076 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
2077 return LRNTypeTable();
2078 }
regionTypeFLATBUFFERS_FINAL_CLASS2079 int32_t regionType() const {
2080 return GetField<int32_t>(4, 0);
2081 }
localSizeFLATBUFFERS_FINAL_CLASS2082 int32_t localSize() const {
2083 return GetField<int32_t>(6, 0);
2084 }
alphaFLATBUFFERS_FINAL_CLASS2085 float alpha() const {
2086 return GetField<float>(8, 0.0f);
2087 }
betaFLATBUFFERS_FINAL_CLASS2088 float beta() const {
2089 return GetField<float>(10, 0.0f);
2090 }
VerifyFLATBUFFERS_FINAL_CLASS2091 bool Verify(flatbuffers::Verifier &verifier) const {
2092 return VerifyTableStart(verifier) &&
2093 VerifyField<int32_t>(verifier, 4) &&
2094 VerifyField<int32_t>(verifier, 6) &&
2095 VerifyField<float>(verifier, 8) &&
2096 VerifyField<float>(verifier, 10) &&
2097 verifier.EndTable();
2098 }
2099 LRNT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2100 void UnPackTo(LRNT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2101 static flatbuffers::Offset<LRN> Pack(flatbuffers::FlatBufferBuilder &_fbb, const LRNT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2102 };
2103
2104 struct LRNBuilder {
2105 flatbuffers::FlatBufferBuilder &fbb_;
2106 flatbuffers::uoffset_t start_;
add_regionTypeLRNBuilder2107 void add_regionType(int32_t regionType) {
2108 fbb_.AddElement<int32_t>(4, regionType, 0);
2109 }
add_localSizeLRNBuilder2110 void add_localSize(int32_t localSize) {
2111 fbb_.AddElement<int32_t>(6, localSize, 0);
2112 }
add_alphaLRNBuilder2113 void add_alpha(float alpha) {
2114 fbb_.AddElement<float>(8, alpha, 0.0f);
2115 }
add_betaLRNBuilder2116 void add_beta(float beta) {
2117 fbb_.AddElement<float>(10, beta, 0.0f);
2118 }
LRNBuilderLRNBuilder2119 explicit LRNBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2120 : fbb_(_fbb) {
2121 start_ = fbb_.StartTable();
2122 }
2123 LRNBuilder &operator=(const LRNBuilder &);
FinishLRNBuilder2124 flatbuffers::Offset<LRN> Finish() {
2125 const auto end = fbb_.EndTable(start_);
2126 auto o = flatbuffers::Offset<LRN>(end);
2127 return o;
2128 }
2129 };
2130
2131 inline flatbuffers::Offset<LRN> CreateLRN(
2132 flatbuffers::FlatBufferBuilder &_fbb,
2133 int32_t regionType = 0,
2134 int32_t localSize = 0,
2135 float alpha = 0.0f,
2136 float beta = 0.0f) {
2137 LRNBuilder builder_(_fbb);
2138 builder_.add_beta(beta);
2139 builder_.add_alpha(alpha);
2140 builder_.add_localSize(localSize);
2141 builder_.add_regionType(regionType);
2142 return builder_.Finish();
2143 }
2144
2145 flatbuffers::Offset<LRN> CreateLRN(flatbuffers::FlatBufferBuilder &_fbb, const LRNT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2146
2147 struct ArgMaxT : public flatbuffers::NativeTable {
2148 typedef ArgMax TableType;
2149 int32_t outMaxVal;
2150 int32_t topK;
2151 int32_t axis;
2152 int32_t softmaxThreshold;
ArgMaxTArgMaxT2153 ArgMaxT()
2154 : outMaxVal(0),
2155 topK(0),
2156 axis(0),
2157 softmaxThreshold(0) {
2158 }
2159 };
2160
2161 struct ArgMax FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2162 typedef ArgMaxT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS2163 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
2164 return ArgMaxTypeTable();
2165 }
outMaxValFLATBUFFERS_FINAL_CLASS2166 int32_t outMaxVal() const {
2167 return GetField<int32_t>(4, 0);
2168 }
topKFLATBUFFERS_FINAL_CLASS2169 int32_t topK() const {
2170 return GetField<int32_t>(6, 0);
2171 }
axisFLATBUFFERS_FINAL_CLASS2172 int32_t axis() const {
2173 return GetField<int32_t>(8, 0);
2174 }
softmaxThresholdFLATBUFFERS_FINAL_CLASS2175 int32_t softmaxThreshold() const {
2176 return GetField<int32_t>(10, 0);
2177 }
VerifyFLATBUFFERS_FINAL_CLASS2178 bool Verify(flatbuffers::Verifier &verifier) const {
2179 return VerifyTableStart(verifier) &&
2180 VerifyField<int32_t>(verifier, 4) &&
2181 VerifyField<int32_t>(verifier, 6) &&
2182 VerifyField<int32_t>(verifier, 8) &&
2183 VerifyField<int32_t>(verifier, 10) &&
2184 verifier.EndTable();
2185 }
2186 ArgMaxT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2187 void UnPackTo(ArgMaxT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2188 static flatbuffers::Offset<ArgMax> Pack(flatbuffers::FlatBufferBuilder &_fbb, const ArgMaxT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2189 };
2190
2191 struct ArgMaxBuilder {
2192 flatbuffers::FlatBufferBuilder &fbb_;
2193 flatbuffers::uoffset_t start_;
add_outMaxValArgMaxBuilder2194 void add_outMaxVal(int32_t outMaxVal) {
2195 fbb_.AddElement<int32_t>(4, outMaxVal, 0);
2196 }
add_topKArgMaxBuilder2197 void add_topK(int32_t topK) {
2198 fbb_.AddElement<int32_t>(6, topK, 0);
2199 }
add_axisArgMaxBuilder2200 void add_axis(int32_t axis) {
2201 fbb_.AddElement<int32_t>(8, axis, 0);
2202 }
add_softmaxThresholdArgMaxBuilder2203 void add_softmaxThreshold(int32_t softmaxThreshold) {
2204 fbb_.AddElement<int32_t>(10, softmaxThreshold, 0);
2205 }
ArgMaxBuilderArgMaxBuilder2206 explicit ArgMaxBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2207 : fbb_(_fbb) {
2208 start_ = fbb_.StartTable();
2209 }
2210 ArgMaxBuilder &operator=(const ArgMaxBuilder &);
FinishArgMaxBuilder2211 flatbuffers::Offset<ArgMax> Finish() {
2212 const auto end = fbb_.EndTable(start_);
2213 auto o = flatbuffers::Offset<ArgMax>(end);
2214 return o;
2215 }
2216 };
2217
2218 inline flatbuffers::Offset<ArgMax> CreateArgMax(
2219 flatbuffers::FlatBufferBuilder &_fbb,
2220 int32_t outMaxVal = 0,
2221 int32_t topK = 0,
2222 int32_t axis = 0,
2223 int32_t softmaxThreshold = 0) {
2224 ArgMaxBuilder builder_(_fbb);
2225 builder_.add_softmaxThreshold(softmaxThreshold);
2226 builder_.add_axis(axis);
2227 builder_.add_topK(topK);
2228 builder_.add_outMaxVal(outMaxVal);
2229 return builder_.Finish();
2230 }
2231
2232 flatbuffers::Offset<ArgMax> CreateArgMax(flatbuffers::FlatBufferBuilder &_fbb, const ArgMaxT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2233
2234 struct AxisT : public flatbuffers::NativeTable {
2235 typedef Axis TableType;
2236 int32_t axis;
AxisTAxisT2237 AxisT()
2238 : axis(0) {
2239 }
2240 };
2241
2242 struct Axis FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2243 typedef AxisT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS2244 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
2245 return AxisTypeTable();
2246 }
axisFLATBUFFERS_FINAL_CLASS2247 int32_t axis() const {
2248 return GetField<int32_t>(4, 0);
2249 }
VerifyFLATBUFFERS_FINAL_CLASS2250 bool Verify(flatbuffers::Verifier &verifier) const {
2251 return VerifyTableStart(verifier) &&
2252 VerifyField<int32_t>(verifier, 4) &&
2253 verifier.EndTable();
2254 }
2255 AxisT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2256 void UnPackTo(AxisT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2257 static flatbuffers::Offset<Axis> Pack(flatbuffers::FlatBufferBuilder &_fbb, const AxisT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2258 };
2259
2260 struct AxisBuilder {
2261 flatbuffers::FlatBufferBuilder &fbb_;
2262 flatbuffers::uoffset_t start_;
add_axisAxisBuilder2263 void add_axis(int32_t axis) {
2264 fbb_.AddElement<int32_t>(4, axis, 0);
2265 }
AxisBuilderAxisBuilder2266 explicit AxisBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2267 : fbb_(_fbb) {
2268 start_ = fbb_.StartTable();
2269 }
2270 AxisBuilder &operator=(const AxisBuilder &);
FinishAxisBuilder2271 flatbuffers::Offset<Axis> Finish() {
2272 const auto end = fbb_.EndTable(start_);
2273 auto o = flatbuffers::Offset<Axis>(end);
2274 return o;
2275 }
2276 };
2277
2278 inline flatbuffers::Offset<Axis> CreateAxis(
2279 flatbuffers::FlatBufferBuilder &_fbb,
2280 int32_t axis = 0) {
2281 AxisBuilder builder_(_fbb);
2282 builder_.add_axis(axis);
2283 return builder_.Finish();
2284 }
2285
2286 flatbuffers::Offset<Axis> CreateAxis(flatbuffers::FlatBufferBuilder &_fbb, const AxisT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2287
2288 struct InputT : public flatbuffers::NativeTable {
2289 typedef Input TableType;
2290 std::vector<int32_t> dims;
2291 DataType dtype;
2292 MNN_DATA_FORMAT dformat;
InputTInputT2293 InputT()
2294 : dtype(DataType_DT_FLOAT),
2295 dformat(MNN_DATA_FORMAT_NC4HW4) {
2296 }
2297 };
2298
2299 struct Input FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2300 typedef InputT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS2301 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
2302 return InputTypeTable();
2303 }
dimsFLATBUFFERS_FINAL_CLASS2304 const flatbuffers::Vector<int32_t> *dims() const {
2305 return GetPointer<const flatbuffers::Vector<int32_t> *>(4);
2306 }
dtypeFLATBUFFERS_FINAL_CLASS2307 DataType dtype() const {
2308 return static_cast<DataType>(GetField<int32_t>(6, 1));
2309 }
dformatFLATBUFFERS_FINAL_CLASS2310 MNN_DATA_FORMAT dformat() const {
2311 return static_cast<MNN_DATA_FORMAT>(GetField<int8_t>(8, 2));
2312 }
VerifyFLATBUFFERS_FINAL_CLASS2313 bool Verify(flatbuffers::Verifier &verifier) const {
2314 return VerifyTableStart(verifier) &&
2315 VerifyOffset(verifier, 4) &&
2316 verifier.VerifyVector(dims()) &&
2317 VerifyField<int32_t>(verifier, 6) &&
2318 VerifyField<int8_t>(verifier, 8) &&
2319 verifier.EndTable();
2320 }
2321 InputT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2322 void UnPackTo(InputT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2323 static flatbuffers::Offset<Input> Pack(flatbuffers::FlatBufferBuilder &_fbb, const InputT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2324 };
2325
2326 struct InputBuilder {
2327 flatbuffers::FlatBufferBuilder &fbb_;
2328 flatbuffers::uoffset_t start_;
add_dimsInputBuilder2329 void add_dims(flatbuffers::Offset<flatbuffers::Vector<int32_t>> dims) {
2330 fbb_.AddOffset(4, dims);
2331 }
add_dtypeInputBuilder2332 void add_dtype(DataType dtype) {
2333 fbb_.AddElement<int32_t>(6, static_cast<int32_t>(dtype), 1);
2334 }
add_dformatInputBuilder2335 void add_dformat(MNN_DATA_FORMAT dformat) {
2336 fbb_.AddElement<int8_t>(8, static_cast<int8_t>(dformat), 2);
2337 }
InputBuilderInputBuilder2338 explicit InputBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2339 : fbb_(_fbb) {
2340 start_ = fbb_.StartTable();
2341 }
2342 InputBuilder &operator=(const InputBuilder &);
FinishInputBuilder2343 flatbuffers::Offset<Input> Finish() {
2344 const auto end = fbb_.EndTable(start_);
2345 auto o = flatbuffers::Offset<Input>(end);
2346 return o;
2347 }
2348 };
2349
2350 inline flatbuffers::Offset<Input> CreateInput(
2351 flatbuffers::FlatBufferBuilder &_fbb,
2352 flatbuffers::Offset<flatbuffers::Vector<int32_t>> dims = 0,
2353 DataType dtype = DataType_DT_FLOAT,
2354 MNN_DATA_FORMAT dformat = MNN_DATA_FORMAT_NC4HW4) {
2355 InputBuilder builder_(_fbb);
2356 builder_.add_dtype(dtype);
2357 builder_.add_dims(dims);
2358 builder_.add_dformat(dformat);
2359 return builder_.Finish();
2360 }
2361
2362 flatbuffers::Offset<Input> CreateInput(flatbuffers::FlatBufferBuilder &_fbb, const InputT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2363
2364 struct LSTMT : public flatbuffers::NativeTable {
2365 typedef LSTM TableType;
2366 int32_t outputCount;
2367 int32_t weightSize;
2368 float clippingThreshold;
2369 std::unique_ptr<BlobT> weightI;
2370 std::unique_ptr<BlobT> weightH;
2371 std::unique_ptr<BlobT> bias;
2372 std::unique_ptr<BlobT> weightIQ;
2373 std::unique_ptr<BlobT> weightIA;
2374 float quantScale;
LSTMTLSTMT2375 LSTMT()
2376 : outputCount(0),
2377 weightSize(0),
2378 clippingThreshold(0.0f),
2379 quantScale(0.0f) {
2380 }
2381 };
2382
2383 struct LSTM FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2384 typedef LSTMT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS2385 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
2386 return LSTMTypeTable();
2387 }
outputCountFLATBUFFERS_FINAL_CLASS2388 int32_t outputCount() const {
2389 return GetField<int32_t>(4, 0);
2390 }
weightSizeFLATBUFFERS_FINAL_CLASS2391 int32_t weightSize() const {
2392 return GetField<int32_t>(6, 0);
2393 }
clippingThresholdFLATBUFFERS_FINAL_CLASS2394 float clippingThreshold() const {
2395 return GetField<float>(8, 0.0f);
2396 }
weightIFLATBUFFERS_FINAL_CLASS2397 const Blob *weightI() const {
2398 return GetPointer<const Blob *>(10);
2399 }
weightHFLATBUFFERS_FINAL_CLASS2400 const Blob *weightH() const {
2401 return GetPointer<const Blob *>(12);
2402 }
biasFLATBUFFERS_FINAL_CLASS2403 const Blob *bias() const {
2404 return GetPointer<const Blob *>(14);
2405 }
weightIQFLATBUFFERS_FINAL_CLASS2406 const Blob *weightIQ() const {
2407 return GetPointer<const Blob *>(16);
2408 }
weightIAFLATBUFFERS_FINAL_CLASS2409 const Blob *weightIA() const {
2410 return GetPointer<const Blob *>(18);
2411 }
quantScaleFLATBUFFERS_FINAL_CLASS2412 float quantScale() const {
2413 return GetField<float>(20, 0.0f);
2414 }
VerifyFLATBUFFERS_FINAL_CLASS2415 bool Verify(flatbuffers::Verifier &verifier) const {
2416 return VerifyTableStart(verifier) &&
2417 VerifyField<int32_t>(verifier, 4) &&
2418 VerifyField<int32_t>(verifier, 6) &&
2419 VerifyField<float>(verifier, 8) &&
2420 VerifyOffset(verifier, 10) &&
2421 verifier.VerifyTable(weightI()) &&
2422 VerifyOffset(verifier, 12) &&
2423 verifier.VerifyTable(weightH()) &&
2424 VerifyOffset(verifier, 14) &&
2425 verifier.VerifyTable(bias()) &&
2426 VerifyOffset(verifier, 16) &&
2427 verifier.VerifyTable(weightIQ()) &&
2428 VerifyOffset(verifier, 18) &&
2429 verifier.VerifyTable(weightIA()) &&
2430 VerifyField<float>(verifier, 20) &&
2431 verifier.EndTable();
2432 }
2433 LSTMT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2434 void UnPackTo(LSTMT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2435 static flatbuffers::Offset<LSTM> Pack(flatbuffers::FlatBufferBuilder &_fbb, const LSTMT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2436 };
2437
2438 struct LSTMBuilder {
2439 flatbuffers::FlatBufferBuilder &fbb_;
2440 flatbuffers::uoffset_t start_;
add_outputCountLSTMBuilder2441 void add_outputCount(int32_t outputCount) {
2442 fbb_.AddElement<int32_t>(4, outputCount, 0);
2443 }
add_weightSizeLSTMBuilder2444 void add_weightSize(int32_t weightSize) {
2445 fbb_.AddElement<int32_t>(6, weightSize, 0);
2446 }
add_clippingThresholdLSTMBuilder2447 void add_clippingThreshold(float clippingThreshold) {
2448 fbb_.AddElement<float>(8, clippingThreshold, 0.0f);
2449 }
add_weightILSTMBuilder2450 void add_weightI(flatbuffers::Offset<Blob> weightI) {
2451 fbb_.AddOffset(10, weightI);
2452 }
add_weightHLSTMBuilder2453 void add_weightH(flatbuffers::Offset<Blob> weightH) {
2454 fbb_.AddOffset(12, weightH);
2455 }
add_biasLSTMBuilder2456 void add_bias(flatbuffers::Offset<Blob> bias) {
2457 fbb_.AddOffset(14, bias);
2458 }
add_weightIQLSTMBuilder2459 void add_weightIQ(flatbuffers::Offset<Blob> weightIQ) {
2460 fbb_.AddOffset(16, weightIQ);
2461 }
add_weightIALSTMBuilder2462 void add_weightIA(flatbuffers::Offset<Blob> weightIA) {
2463 fbb_.AddOffset(18, weightIA);
2464 }
add_quantScaleLSTMBuilder2465 void add_quantScale(float quantScale) {
2466 fbb_.AddElement<float>(20, quantScale, 0.0f);
2467 }
LSTMBuilderLSTMBuilder2468 explicit LSTMBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2469 : fbb_(_fbb) {
2470 start_ = fbb_.StartTable();
2471 }
2472 LSTMBuilder &operator=(const LSTMBuilder &);
FinishLSTMBuilder2473 flatbuffers::Offset<LSTM> Finish() {
2474 const auto end = fbb_.EndTable(start_);
2475 auto o = flatbuffers::Offset<LSTM>(end);
2476 return o;
2477 }
2478 };
2479
2480 inline flatbuffers::Offset<LSTM> CreateLSTM(
2481 flatbuffers::FlatBufferBuilder &_fbb,
2482 int32_t outputCount = 0,
2483 int32_t weightSize = 0,
2484 float clippingThreshold = 0.0f,
2485 flatbuffers::Offset<Blob> weightI = 0,
2486 flatbuffers::Offset<Blob> weightH = 0,
2487 flatbuffers::Offset<Blob> bias = 0,
2488 flatbuffers::Offset<Blob> weightIQ = 0,
2489 flatbuffers::Offset<Blob> weightIA = 0,
2490 float quantScale = 0.0f) {
2491 LSTMBuilder builder_(_fbb);
2492 builder_.add_quantScale(quantScale);
2493 builder_.add_weightIA(weightIA);
2494 builder_.add_weightIQ(weightIQ);
2495 builder_.add_bias(bias);
2496 builder_.add_weightH(weightH);
2497 builder_.add_weightI(weightI);
2498 builder_.add_clippingThreshold(clippingThreshold);
2499 builder_.add_weightSize(weightSize);
2500 builder_.add_outputCount(outputCount);
2501 return builder_.Finish();
2502 }
2503
2504 flatbuffers::Offset<LSTM> CreateLSTM(flatbuffers::FlatBufferBuilder &_fbb, const LSTMT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2505
2506 struct SliceT : public flatbuffers::NativeTable {
2507 typedef Slice TableType;
2508 int32_t axis;
2509 std::vector<int32_t> slicePoints;
2510 NetSource sourceType;
SliceTSliceT2511 SliceT()
2512 : axis(0),
2513 sourceType(NetSource_CAFFE) {
2514 }
2515 };
2516
2517 struct Slice FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2518 typedef SliceT NativeTableType;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS2519 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
2520 return SliceTypeTable();
2521 }
axisFLATBUFFERS_FINAL_CLASS2522 int32_t axis() const {
2523 return GetField<int32_t>(4, 0);
2524 }
slicePointsFLATBUFFERS_FINAL_CLASS2525 const flatbuffers::Vector<int32_t> *slicePoints() const {
2526 return GetPointer<const flatbuffers::Vector<int32_t> *>(6);
2527 }
sourceTypeFLATBUFFERS_FINAL_CLASS2528 NetSource sourceType() const {
2529 return static_cast<NetSource>(GetField<int8_t>(8, 0));
2530 }
VerifyFLATBUFFERS_FINAL_CLASS2531 bool Verify(flatbuffers::Verifier &verifier) const {
2532 return VerifyTableStart(verifier) &&
2533 VerifyField<int32_t>(verifier, 4) &&
2534 VerifyOffset(verifier, 6) &&
2535 verifier.VerifyVector(slicePoints()) &&
2536 VerifyField<int8_t>(verifier, 8) &&
2537 verifier.EndTable();
2538 }
2539 SliceT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2540 void UnPackTo(SliceT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2541 static flatbuffers::Offset<Slice> Pack(flatbuffers::FlatBufferBuilder &_fbb, const SliceT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2542 };
2543
2544 struct SliceBuilder {
2545 flatbuffers::FlatBufferBuilder &fbb_;
2546 flatbuffers::uoffset_t start_;
add_axisSliceBuilder2547 void add_axis(int32_t axis) {
2548 fbb_.AddElement<int32_t>(4, axis, 0);
2549 }
add_slicePointsSliceBuilder2550 void add_slicePoints(flatbuffers::Offset<flatbuffers::Vector<int32_t>> slicePoints) {
2551 fbb_.AddOffset(6, slicePoints);
2552 }
add_sourceTypeSliceBuilder2553