mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
In current implementation, axis in softmax has to be the last, which is an obvious limitation. This PR removes this limitation and will fix issues #20710 and #22176.
104 lines
2.9 KiB
Text
104 lines
2.9 KiB
Text
[
|
|
{
|
|
"name": "Softmax with no attributes",
|
|
"operator": "Softmax",
|
|
"attributes": [],
|
|
"cases": [
|
|
{
|
|
"name": "T[2,2]",
|
|
"inputs": [
|
|
{
|
|
"data": [1.0, 2.0, 3.0, 4.0],
|
|
"dims": [2, 2],
|
|
"type": "float32"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"data": [0.2689414322376251, 0.7310585975646973, 0.2689414322376251, 0.7310585975646973],
|
|
"dims": [2, 2],
|
|
"type": "float32"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "T[2, 2, 2]",
|
|
"inputs": [
|
|
{
|
|
"data": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0],
|
|
"dims": [2, 2, 2],
|
|
"type": "float32"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"data": [
|
|
0.2689414322376251, 0.7310585975646973, 0.2689414322376251, 0.7310585975646973, 0.2689414322376251,
|
|
0.7310585975646973, 0.2689414322376251, 0.7310585975646973
|
|
],
|
|
"dims": [2, 2, 2],
|
|
"type": "float32"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Softmax with attribute axis -1",
|
|
"operator": "Softmax",
|
|
"attributes": [{ "name": "axis", "data": -1, "type": "int" }],
|
|
"cases": [
|
|
{
|
|
"name": "T[2,2]",
|
|
"inputs": [
|
|
{
|
|
"data": [1.0, 2.0, 3.0, 4.0],
|
|
"dims": [2, 2],
|
|
"type": "float32"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"data": [0.2689414322376251, 0.7310585975646973, 0.2689414322376251, 0.7310585975646973],
|
|
"dims": [2, 2],
|
|
"type": "float32"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Softmax with attribute axis 1",
|
|
"operator": "Softmax",
|
|
"attributes": [{ "name": "axis", "data": 1, "type": "int" }],
|
|
"cases": [
|
|
{
|
|
"name": "T[1, 2, 3, 4]",
|
|
"inputs": [
|
|
{
|
|
"data": [
|
|
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
|
|
],
|
|
"dims": [1, 2, 3, 4],
|
|
"type": "float32"
|
|
}
|
|
],
|
|
"outputs": [
|
|
{
|
|
"data": [
|
|
0.000006144174221844878, 0.000006144174221844878, 0.000006144174221844878, 0.000006144174221844878,
|
|
0.000006144174221844878, 0.000006144174221844878, 0.000006144174221844878, 0.000006144174221844878,
|
|
0.000006144174221844878, 0.000006144174221844878, 0.000006144174221844878, 0.000006144174221844878,
|
|
0.9999938011169434, 0.9999938011169434, 0.9999938011169434, 0.9999938011169434, 0.9999938011169434,
|
|
0.9999938011169434, 0.9999938011169434, 0.9999938011169434, 0.9999938011169434, 0.9999938011169434,
|
|
0.9999938011169434, 0.9999938011169434
|
|
],
|
|
"dims": [1, 2, 3, 4],
|
|
"type": "float32"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|