Skip to content

Commit

Permalink
[KaNN] Adapt metadata and ModelFactory.match()
Browse files Browse the repository at this point in the history
  • Loading branch information
Zephirin Faure committed Sep 26, 2024
1 parent df8e0b8 commit 0fda096
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 100 deletions.
90 changes: 1 addition & 89 deletions source/kann-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,14 @@
"name": "Substraction",
"category": "Transform"
},
{
"name": "Erf",
"category": "Layer"
},
{
"name": "LayerNorm",
"category": "Normalization"
},
{
"name": "Output",
"category": "Data"
},
{
"name": "MaxWithConstant",
"category": "Transform"
},
{
"name": "ConvolutionCV2",
"category": "Layer"
},
{
"name": "Reciprocal",
"category": "Layer"
},
{
"name": "ReLU",
"category": "Activation"
Expand All @@ -43,14 +27,6 @@
"name": "ResizeNearestAsymFloor",
"category": "Shape"
},
{
"name": "MulElementwise",
"category": "Transform"
},
{
"name": "Copy",
"category": "Transform"
},
{
"name": "Exp",
"category": "Activation"
Expand All @@ -63,14 +39,6 @@
"name": "Stddev",
"category": "Normalization"
},
{
"name": "Division",
"category": "Layer"
},
{
"name": "MatMul",
"category": "Transform"
},
{
"name": "AvgPooling",
"category": "Pool"
Expand All @@ -79,78 +47,30 @@
"name": "HardSigmoid",
"category": "Activation"
},
{
"name": "MaxElementwise",
"category": "Transform"
},
{
"name": "SeLU",
"category": "Activation"
},
{
"name": "LRN",
"category": "Activation"
},
{
"name": "MulWithConstant",
"category": "Transform"
},
{
"name": "Abs",
"category": "Transform"
},
{
"name": "Invert",
"category": "Transform"
},
{
"name": "Sqrt",
"category": "Transform"
},
{
"name": "MinElementwise",
"category": "Transform"
"category": "Normalization"
},
{
"name": "GeLU",
"category": "Activation"
},
{
"name": "Input",
"category": "Data"
},
{
"name": "Logistic",
"category": "Activation"
},
{
"name": "Reshape",
"category": "Shape"
},
{
"name": "AddElementwise",
"category": "Transform"
},
{
"name": "Saturate",
"category": "Transform"
},
{
"name": "Tanh",
"category": "Activation"
},
{
"name": "ScalingVector",
"category": "Transform"
},
{
"name": "MaxPooling",
"category": "Pool"
},
{
"name": "Convert",
"category": "Transform"
},
{
"name": "DepthwiseConvolution",
"category": "Layer"
Expand All @@ -159,14 +79,6 @@
"name": "Softmax",
"category": "Activation"
},
{
"name": "MinWithConstant",
"category": "Transform"
},
{
"name": "WriteValue",
"category": "Data"
},
{
"name": "SiLU",
"category": "Activation"
Expand Down
11 changes: 0 additions & 11 deletions source/kann.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@ kann.ModelFactory = class {
context.target = reader;
return;

Check failure on line 15 in source/kann.js

View workflow job for this annotation

GitHub Actions / Build (macos-latest)

Unnecessary return statement

Check failure on line 15 in source/kann.js

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest)

Unnecessary return statement
}
// If KaNN identifier not found, check if the file is '.kann'
const identifier = context.identifier;
const extension = identifier.split('.').pop().toLowerCase();
if (extension === 'kann' && reader && reader.identifier === '') {
const version = reader.uint32_(reader.root, 4, 0);
if (version === 1) {
context.type = 'kann.flatbuffers';
context.target = reader;
return;
}
}
}

// Open and initialize the KaNN model from the context
Expand Down

0 comments on commit 0fda096

Please sign in to comment.