Lutz Roeder 4 лет назад
Родитель
Сommit
5f350dde5e
2 измененных файлов с 41 добавлено и 4 удалено
  1. 2 0
      source/view-grapher.css
  2. 39 4
      source/xmodel.js

+ 2 - 0
source/view-grapher.css

@@ -35,6 +35,7 @@
 .node-item-type-tensor path { fill: rgb(89, 66, 59); }
 .node-item-type-transform path { fill: rgb(51, 85, 68); }
 .node-item-type-data path { fill: rgb(85, 85, 85); }
+.node-item-type-quantization path { fill: rgb(80, 40, 0); }
 .node-item-type-custom path { fill: rgb(128, 128, 128); }
 
 .node-item-input path { fill: #fff; }
@@ -130,5 +131,6 @@
     .node-item-type-tensor path { fill: rgba(89, 66, 59, 0.7); }
     .node-item-type-transform path { fill: rgba(51, 85, 68, 0.7); }
     .node-item-type-data path { fill: rgba(85, 85, 85, 0.7); }
+    .node-item-type-quantization path { fill: rgb(80, 40, 0, 0.7); }
     .node-item-type-custom path { fill: rgb(64, 64, 64, 0.7); }
 }

+ 39 - 4
source/xmodel.js

@@ -418,14 +418,49 @@ xmodel.Metadata = class {
         this._map = new Map();
         this._attributeCache = new Map();
         const categories = new Map([
+            [ 'avgpool2d', 'Pool' ],
+            [ 'batchnorm', 'Normalization' ],
+            [ 'celu', 'Activation' ],
+            [ 'concat-fix', 'Tensor' ],
+            [ 'concat', 'Tensor' ],
             [ 'conv2d-fix', 'Layer' ],
+            [ 'conv2d', 'Layer' ],
             [ 'depthwise-conv2d-fix', 'Layer' ],
-            [ 'upsample-fix', 'Layer' ],
+            [ 'depthwise-conv2d', 'Layer' ],
+            [ 'elu', 'Activation' ],
+            [ 'fix', 'Quantization' ],
+            [ 'fix2float', 'Quantization' ],
+            [ 'flatten', 'Shape' ],
+            [ 'float2fix', 'Quantization' ],
+            [ 'gelu', 'Activation' ],
+            [ 'hard-sigmoid', 'Activation' ],
+            [ 'hard-swish', 'Activation' ],
+            [ 'hard-tanh', 'Activation' ],
+            [ 'identity', 'Control' ],
+            [ 'inner-product', 'Layer' ],
+            [ 'l2_normalize', 'Normalization' ],
+            [ 'leaky-relu', 'Activation' ],
+            [ 'maxpool2d', 'Pool' ],
             [ 'pool-fix', 'Pool' ],
-            [ 'batchnorm', 'Normalization' ],
-            [ 'concat-fix', 'Tensor' ],
+            [ 'relu', 'Activation' ],
+            [ 'relu6', 'Activation' ],
             [ 'reshape-fix', 'Shape' ],
-            [ 'softmax', 'Activation' ]
+            [ 'reshape', 'Shape' ],
+            [ 'scale', 'Layer' ],
+            [ 'selu', 'Activation' ],
+            [ 'shape', 'Shape' ],
+            [ 'sigmoid', 'Activation' ],
+            [ 'softmax', 'Activation' ],
+            [ 'squeeze', 'Transform' ],
+            [ 'stack', 'Tensor' ],
+            [ 'strided_slice', 'Tensor' ],
+            [ 'swish', 'Activation' ],
+            [ 'tanh', 'Activation' ],
+            [ 'threshold', 'Quantization' ],
+            [ 'transpose', 'Tensor' ],
+            [ 'transposed-conv2d', 'Layer' ],
+            [ 'transposed-depthwise-conv2d', 'Layer' ],
+            [ 'upsample-fix', 'Data' ],
         ]);
         for (const op_def of op_defs) {
             const name = op_def.name;