Skip to content

Commit

Permalink
add group-conv activation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qjia7 committed Jan 30, 2024
1 parent 8217ca5 commit 71ebfdc
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions js/web/test/data/ops/fused-conv.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -210,5 +210,81 @@
]
}
]
},
{
"name": "fused group-conv with HardSigmoid",
"operator": "FusedConv",
"attributes": [
{ "name": "activation", "data": "HardSigmoid", "type": "string" },
{ "name": "kernel_shape", "data": [2, 2], "type": "ints" },
{ "name": "group", "data": 3, "type": "int" },
{ "name": "activation_params", "data": [2.0, 5.0], "type": "floats" }
],
"opset": { "domain": "com.microsoft", "version": 1 },
"cases": [
{
"name": "T[0]",
"inputs": [
{
"data": [
0.0, 1.0, 2.0, -3.0, 4.0, -5.0, 6.0, 7.0, 8.0, -9.0, -10.0, 11.0, -12.0, 13.0, -14.0, 15.0, 16.0, 17.0,
18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0
],
"dims": [1, 3, 3, 3],
"type": "float32"
},
{
"data": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
"dims": [3, 1, 2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1],
"dims": [1, 3, 2, 2],
"type": "float32"
}
]
}
]
},
{
"name": "NHWC group-conv with HardSigmoid",
"operator": "Conv",
"attributes": [
{ "name": "activation", "data": "HardSigmoid", "type": "string" },
{ "name": "kernel_shape", "data": [2, 2], "type": "ints" },
{ "name": "group", "data": 3, "type": "int" },
{ "name": "activation_params", "data": [2.0, 5.0], "type": "floats" }
],
"opset": { "domain": "com.ms.internal.nhwc", "version": 1 },
"cases": [
{
"name": "T[0]",
"inputs": [
{
"data": [
0.0, 1.0, 2.0, -3.0, 4.0, -5.0, 6.0, 7.0, 8.0, -9.0, -10.0, 11.0, -12.0, 13.0, -14.0, 15.0, 16.0, 17.0,
18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0
],
"dims": [1, 3, 3, 3],
"type": "float32"
},
{
"data": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
"dims": [3, 1, 2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1],
"dims": [1, 2, 2, 3],
"type": "float32"
}
]
}
]
}
]

0 comments on commit 71ebfdc

Please sign in to comment.