2
0

dlc.fbs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. namespace dlc.v3;
  2. table Model {
  3. unk1: int;
  4. nodes: [Node];
  5. unk2: [int];
  6. unk3: [int];
  7. attributes: [Attribute];
  8. }
  9. table Node {
  10. index: int;
  11. name: string;
  12. type: string;
  13. inputs: [string];
  14. outputs: [string];
  15. attributes: [Attribute];
  16. }
  17. table Tensor {
  18. name: string;
  19. shape: [int];
  20. data: TensorData;
  21. attributes: [Attribute];
  22. }
  23. table TensorData {
  24. dtype: ubyte;
  25. bytes: [ubyte];
  26. floats: [float];
  27. }
  28. table Attribute {
  29. name: string;
  30. type: ubyte;
  31. bool_value: bool;
  32. int32_value: int;
  33. uint32_value: uint;
  34. float32_value: float;
  35. string_value: string;
  36. unk6: [byte];
  37. byte_list: [byte];
  38. int32_list: [int];
  39. float32_list: [float];
  40. unk10: [byte];
  41. attributes: [Attribute];
  42. }
  43. enum Activation : uint {
  44. ReLU = 1,
  45. Sigmoid = 3
  46. }
  47. table ModelParameters {
  48. nodes: [NodeParameters];
  49. }
  50. table NodeParameters {
  51. name: string;
  52. weights: [Tensor];
  53. }
  54. namespace dlc.v4;
  55. table Model {
  56. graphs: [Graph];
  57. }
  58. table Graph {
  59. name: string;
  60. nodes: [Node];
  61. tensors: [Tensor];
  62. }
  63. table Node {
  64. name: string;
  65. type: string;
  66. inputs: [string];
  67. outputs: [string];
  68. attributes: [Attribute];
  69. }
  70. table Attribute {
  71. name: string;
  72. kind: int; // 0 = value, 1 = tensor
  73. flag: ubyte;
  74. value: Value;
  75. tensor: Tensor;
  76. }
  77. table Value {
  78. kind: int;
  79. int32_value: int;
  80. float32_value: float;
  81. string_value: string;
  82. }
  83. table Tensor {
  84. unk1: uint;
  85. name: string;
  86. location: int;
  87. shape: [int];
  88. unk2: int;
  89. info: TensorInfo;
  90. dtype: int;
  91. output_dtype: int;
  92. unk6: ubyte;
  93. }
  94. table TensorInfo {
  95. i1: int;
  96. b1: ubyte;
  97. a: TensorInfo1;
  98. b: TensorInfo2;
  99. }
  100. table TensorInfo1 {
  101. i1: int;
  102. f1: float;
  103. f2: float;
  104. f3: float;
  105. i2: int;
  106. }
  107. table TensorInfo2 {
  108. i1: int;
  109. l: [TensorInfo3];
  110. }
  111. table TensorInfo3 {
  112. i1: int;
  113. f1: float;
  114. f2: float;
  115. f3: float;
  116. i2: int;
  117. b1: ubyte;
  118. }
  119. table ModelParameters64 {
  120. buffers: [Buffer];
  121. params: [ubyte];
  122. }
  123. table ModelParameters {
  124. graphs: [GraphParameters];
  125. }
  126. table GraphParameters {
  127. name: string;
  128. tensors: [TensorData];
  129. nodes: [NodeParameters];
  130. }
  131. table NodeParameters {
  132. tensors: [TensorData];
  133. }
  134. table TensorData {
  135. name: string;
  136. bytes: [ubyte];
  137. }
  138. table Buffer {
  139. bytes: [ubyte];
  140. }