Source code

Revision control

Copy as Markdown

Other Tools

{
"tests": [
{
"name": "slice float32 1D constant tensor",
"inputs": {
"input": {
"shape": [24],
"data": [
28.846251144212147,
97.9541470229301,
-68.15961736262523,
14.978987588557175,
90.23090084798065,
76.59095547712559,
-24.556316258204532,
79.58749302462488,
65.21375982234204,
57.43970862960305,
74.41775256222849,
-4.513182026141791,
0.5424534704526991,
80.44634130202977,
28.327650022124686,
74.0261938866893,
-74.54558964005362,
-27.30604081001799,
-70.4277433212161,
59.82631931755259,
-58.46095416849133,
79.80571087632629,
-9.857854207596304,
42.66519880465225
],
"type": "float32",
"constant": true
}
},
"starts": [12],
"sizes": [12],
"expected": {
"name": "output",
"shape": [12],
"data": [
0.5424534678459167,
80.44634246826172,
28.32765007019043,
74.02619171142578,
-74.54559326171875,
-27.306041717529297,
-70.42774200439453,
59.82632064819336,
-58.46095275878906,
79.80570983886719,
-9.857853889465332,
42.665199279785156
],
"type": "float32"
}
},
{
"name": "slice float32 1D tensor",
"inputs": {
"input": {
"shape": [24],
"data": [
28.846251144212147,
97.9541470229301,
-68.15961736262523,
14.978987588557175,
90.23090084798065,
76.59095547712559,
-24.556316258204532,
79.58749302462488,
65.21375982234204,
57.43970862960305,
74.41775256222849,
-4.513182026141791,
0.5424534704526991,
80.44634130202977,
28.327650022124686,
74.0261938866893,
-74.54558964005362,
-27.30604081001799,
-70.4277433212161,
59.82631931755259,
-58.46095416849133,
79.80571087632629,
-9.857854207596304,
42.66519880465225
],
"type": "float32"
}
},
"starts": [12],
"sizes": [12],
"expected": {
"name": "output",
"shape": [12],
"data": [
0.5424534678459167,
80.44634246826172,
28.32765007019043,
74.02619171142578,
-74.54559326171875,
-27.306041717529297,
-70.42774200439453,
59.82632064819336,
-58.46095275878906,
79.80570983886719,
-9.857853889465332,
42.665199279785156
],
"type": "float32"
}
},
{
"name": "slice float32 2D tensor",
"inputs": {
"input": {
"shape": [4, 6],
"data": [
28.846251144212147,
97.9541470229301,
-68.15961736262523,
14.978987588557175,
90.23090084798065,
76.59095547712559,
-24.556316258204532,
79.58749302462488,
65.21375982234204,
57.43970862960305,
74.41775256222849,
-4.513182026141791,
0.5424534704526991,
80.44634130202977,
28.327650022124686,
74.0261938866893,
-74.54558964005362,
-27.30604081001799,
-70.4277433212161,
59.82631931755259,
-58.46095416849133,
79.80571087632629,
-9.857854207596304,
42.66519880465225
],
"type": "float32"
}
},
"starts": [2, 2],
"sizes": [2, 4],
"expected": {
"name": "output",
"shape": [2, 4],
"data": [
28.32765007019043,
74.02619171142578,
-74.54559326171875,
-27.306041717529297,
-58.46095275878906,
79.80570983886719,
-9.857853889465332,
42.665199279785156
],
"type": "float32"
}
},
{
"name": "slice float32 3D tensor",
"inputs": {
"input": {
"shape": [4, 3, 2],
"data": [
28.846251144212147,
97.9541470229301,
-68.15961736262523,
14.978987588557175,
90.23090084798065,
76.59095547712559,
-24.556316258204532,
79.58749302462488,
65.21375982234204,
57.43970862960305,
74.41775256222849,
-4.513182026141791,
0.5424534704526991,
80.44634130202977,
28.327650022124686,
74.0261938866893,
-74.54558964005362,
-27.30604081001799,
-70.4277433212161,
59.82631931755259,
-58.46095416849133,
79.80571087632629,
-9.857854207596304,
42.66519880465225
],
"type": "float32"
}
},
"starts": [1, 1, 1],
"sizes": [3, 2, 1],
"expected": {
"name": "output",
"shape": [3, 2, 1],
"data": [
57.4397087097168,
-4.513182163238525,
74.02619171142578,
-27.306041717529297,
79.80570983886719,
42.665199279785156
],
"type": "float32"
}
},
{
"name": "slice float32 4D tensor",
"inputs": {
"input": {
"shape": [2, 2, 3, 2],
"data": [
28.846251144212147,
97.9541470229301,
-68.15961736262523,
14.978987588557175,
90.23090084798065,
76.59095547712559,
-24.556316258204532,
79.58749302462488,
65.21375982234204,
57.43970862960305,
74.41775256222849,
-4.513182026141791,
0.5424534704526991,
80.44634130202977,
28.327650022124686,
74.0261938866893,
-74.54558964005362,
-27.30604081001799,
-70.4277433212161,
59.82631931755259,
-58.46095416849133,
79.80571087632629,
-9.857854207596304,
42.66519880465225
],
"type": "float32"
}
},
"starts": [1, 0, 2, 1],
"sizes": [1, 2, 1, 1],
"expected": {
"name": "output",
"shape": [1, 2, 1, 1],
"data": [
-27.306041717529297,
42.665199279785156
],
"type": "float32"
}
},
{
"name": "slice float32 5D tensor",
"inputs": {
"input": {
"shape": [2, 2, 3, 2, 1],
"data": [
28.846251144212147,
97.9541470229301,
-68.15961736262523,
14.978987588557175,
90.23090084798065,
76.59095547712559,
-24.556316258204532,
79.58749302462488,
65.21375982234204,
57.43970862960305,
74.41775256222849,
-4.513182026141791,
0.5424534704526991,
80.44634130202977,
28.327650022124686,
74.0261938866893,
-74.54558964005362,
-27.30604081001799,
-70.4277433212161,
59.82631931755259,
-58.46095416849133,
79.80571087632629,
-9.857854207596304,
42.66519880465225
],
"type": "float32"
}
},
"starts": [1, 0, 2, 1, 0],
"sizes": [1, 2, 1, 1, 1],
"expected": {
"name": "output",
"shape": [1, 2, 1, 1, 1],
"data": [
-27.306041717529297,
42.665199279785156
],
"type": "float32"
}
}
]
}