فهرست منبع

Update megengine-schema.js

Lutz Roeder 3 سال پیش
والد
کامیت
e7f61d58ab
2فایلهای تغییر یافته به همراه23 افزوده شده و 0 حذف شده
  1. 9 0
      source/megengine-metadata.json
  2. 14 0
      source/megengine-schema.js

+ 9 - 0
source/megengine-metadata.json

@@ -3513,5 +3513,14 @@
   {
     "name": "Concat",
     "category": "Tensor"
+  },
+  {
+    "name": "GroupNorm",
+    "attributes": [
+      { "name": "affine", "type": "bool", "default": true },
+      { "name": "eps", "type": "float32", "default": 0.00001 },
+      { "name": "group", "type": "uint32", "default": 1 },
+      { "name": "format", "type": "ConvolutionFormat", "default": "NCHW" }
+    ]
   }
 ]

+ 14 - 0
source/megengine-schema.js

@@ -1761,6 +1761,18 @@ $root.mgb.serialization.fbs.param.LayerNorm = class LayerNorm {
     }
 };
 
+$root.mgb.serialization.fbs.param.GroupNorm = class GroupNorm {
+
+    static decode(reader, position) {
+        const $ = new $root.mgb.serialization.fbs.param.GroupNorm();
+        $.affine = reader.bool_(position, 4, true);
+        $.eps = reader.float32_(position, 6, 0.00001);
+        $.group = reader.uint32_(position, 8, 1);
+        $.format = reader.uint32_(position, 10, 0);
+        return $;
+    }
+};
+
 $root.mgb.serialization.fbs.param.Dropout = class Dropout {
 
     static decode(reader, position) {
@@ -2329,6 +2341,7 @@ $root.mgb.serialization.fbs.v2.OperatorParam = class {
             case 89: return $root.mgb.serialization.fbs.param.LSTM.decode(reader, position);
             case 90: return $root.mgb.serialization.fbs.param.Softmax.decode(reader, position);
             case 91: return $root.mgb.serialization.fbs.param.Diag.decode(reader, position);
+            case 92: return $root.mgb.serialization.fbs.param.GroupNorm.decode(reader, position);
             default: return undefined;
         }
     }
@@ -2426,6 +2439,7 @@ $root.mgb.serialization.fbs.v2.OperatorParam = class {
             case 'LSTM': return $root.mgb.serialization.fbs.param.LSTM.decodeText(reader, json);
             case 'Softmax': return $root.mgb.serialization.fbs.param.Softmax.decodeText(reader, json);
             case 'Diag': return $root.mgb.serialization.fbs.param.Diag.decodeText(reader, json);
+            case 'GroupNorm': return $root.mgb.serialization.fbs.param.GroupNorm.decodeText(reader, json);
             default: return undefined;
         }
     }