Source code

Revision control

Copy as Markdown

Other Tools

{
"tests": [
{
"name": "expand float32 0D scalar to 1D",
"inputs": {
"input": {
"shape": [],
"data": [
-6.461850643157959
],
"type": "float32"
}
},
"newShape": [24],
"expected": {
"name": "output",
"shape": [24],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 0D scalar to 2D",
"inputs": {
"input": {
"shape": [],
"data": [
-6.461850643157959
],
"type": "float32"
}
},
"newShape": [4, 6],
"expected": {
"name": "output",
"shape": [4, 6],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 0D scalar to 3D",
"inputs": {
"input": {
"shape": [],
"data": [
-6.461850643157959
],
"type": "float32"
}
},
"newShape": [2, 3, 4],
"expected": {
"name": "output",
"shape": [2, 3, 4],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 0D scalar to 4D",
"inputs": {
"input": {
"shape": [],
"data": [
-6.461850643157959
],
"type": "float32"
}
},
"newShape": [2, 2, 2, 3],
"expected": {
"name": "output",
"shape": [2, 2, 2, 3],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 0D scalar to 5D",
"inputs": {
"input": {
"shape": [],
"data": [
-6.461850643157959
],
"type": "float32"
}
},
"newShape": [2, 2, 3, 1, 2],
"expected": {
"name": "output",
"shape": [2, 2, 3, 1, 2],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 1D constant tensor to 1D",
"inputs": {
"input": {
"shape": [1],
"data": [
-6.461850643157959
],
"type": "float32",
"constant": true
}
},
"newShape": [24],
"expected": {
"name": "output",
"shape": [24],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 1D tensor to 1D",
"inputs": {
"input": {
"shape": [1],
"data": [
-6.461850643157959
],
"type": "float32"
}
},
"newShape": [24],
"expected": {
"name": "output",
"shape": [24],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 1D tensor to 2D",
"inputs": {
"input": {
"shape": [1],
"data": [
-6.461850643157959
],
"type": "float32"
}
},
"newShape": [4, 6],
"expected": {
"name": "output",
"shape": [4, 6],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 1D tensor to 3D",
"inputs": {
"input": {
"shape": [1],
"data": [
-6.461850643157959
],
"type": "float32"
}
},
"newShape": [2, 3, 4],
"expected": {
"name": "output",
"shape": [2, 3, 4],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 1D tensor to 4D",
"inputs": {
"input": {
"shape": [1],
"data": [
-6.461850643157959
],
"type": "float32"
}
},
"newShape": [2, 2, 2, 3],
"expected": {
"name": "output",
"shape": [2, 2, 2, 3],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 1D tensor to 5D",
"inputs": {
"input": {
"shape": [1],
"data": [
-6.461850643157959
],
"type": "float32"
}
},
"newShape": [2, 2, 3, 1, 2],
"expected": {
"name": "output",
"shape": [2, 2, 3, 1, 2],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 2D tensor to 2D (1st dimension)",
"inputs": {
"input": {
"shape": [1, 6],
"data": [
10.898762702941895,
-29.391416549682617,
-73.74250793457031,
22.456905364990234,
-97.5792465209961,
-76.95013427734375
],
"type": "float32"
}
},
"newShape": [4, 6],
"expected": {
"name": "output",
"shape": [4, 6],
"data": [
10.898762702941895,
-29.391416549682617,
-73.74250793457031,
22.456905364990234,
-97.5792465209961,
-76.95013427734375,
10.898762702941895,
-29.391416549682617,
-73.74250793457031,
22.456905364990234,
-97.5792465209961,
-76.95013427734375,
10.898762702941895,
-29.391416549682617,
-73.74250793457031,
22.456905364990234,
-97.5792465209961,
-76.95013427734375,
10.898762702941895,
-29.391416549682617,
-73.74250793457031,
22.456905364990234,
-97.5792465209961,
-76.95013427734375
],
"type": "float32"
}
},
{
"name": "expand float32 2D tensor to 2D (2nd dimension)",
"inputs": {
"input": {
"shape": [4, 1],
"data": [
4.965915679931641,
66.14382934570312,
75.28175354003906,
49.998130798339844
],
"type": "float32"
}
},
"newShape": [4, 6],
"expected": {
"name": "output",
"shape": [4, 6],
"data": [
4.965915679931641,
4.965915679931641,
4.965915679931641,
4.965915679931641,
4.965915679931641,
4.965915679931641,
66.14382934570312,
66.14382934570312,
66.14382934570312,
66.14382934570312,
66.14382934570312,
66.14382934570312,
75.28175354003906,
75.28175354003906,
75.28175354003906,
75.28175354003906,
75.28175354003906,
75.28175354003906,
49.998130798339844,
49.998130798339844,
49.998130798339844,
49.998130798339844,
49.998130798339844,
49.998130798339844
],
"type": "float32"
}
},
{
"name": "expand float32 2D tensor to 2D (all dimensions)",
"inputs": {
"input": {
"shape": [1, 1],
"data": [
-6.461850643157959
],
"type": "float32"
}
},
"newShape": [4, 6],
"expected": {
"name": "output",
"shape": [4, 6],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 2D tensor to 3D",
"inputs": {
"input": {
"shape": [4, 1],
"data": [
4.965915679931641,
66.14382934570312,
75.28175354003906,
49.998130798339844
],
"type": "float32"
}
},
"newShape": [2, 4, 3],
"expected": {
"name": "output",
"shape": [2, 4, 3],
"data": [
4.965915679931641,
4.965915679931641,
4.965915679931641,
66.14382934570312,
66.14382934570312,
66.14382934570312,
75.28175354003906,
75.28175354003906,
75.28175354003906,
49.998130798339844,
49.998130798339844,
49.998130798339844,
4.965915679931641,
4.965915679931641,
4.965915679931641,
66.14382934570312,
66.14382934570312,
66.14382934570312,
75.28175354003906,
75.28175354003906,
75.28175354003906,
49.998130798339844,
49.998130798339844,
49.998130798339844
],
"type": "float32"
}
},
{
"name": "expand float32 2D tensor to 4D",
"inputs": {
"input": {
"shape": [1, 6],
"data": [
10.898762702941895,
-29.391416549682617,
-73.74250793457031,
22.456905364990234,
-97.5792465209961,
-76.95013427734375
],
"type": "float32"
}
},
"newShape": [2, 1, 2, 6],
"expected": {
"name": "output",
"shape": [2, 1, 2, 6],
"data": [
10.898762702941895,
-29.391416549682617,
-73.74250793457031,
22.456905364990234,
-97.5792465209961,
-76.95013427734375,
10.898762702941895,
-29.391416549682617,
-73.74250793457031,
22.456905364990234,
-97.5792465209961,
-76.95013427734375,
10.898762702941895,
-29.391416549682617,
-73.74250793457031,
22.456905364990234,
-97.5792465209961,
-76.95013427734375,
10.898762702941895,
-29.391416549682617,
-73.74250793457031,
22.456905364990234,
-97.5792465209961,
-76.95013427734375
],
"type": "float32"
}
},
{
"name": "expand float32 2D tensor to 5D",
"inputs": {
"input": {
"shape": [1, 1],
"data": [
-6.461850643157959
],
"type": "float32"
}
},
"newShape": [2, 1, 3, 2, 2],
"expected": {
"name": "output",
"shape": [2, 1, 3, 2, 2],
"data": [
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959,
-6.461850643157959
],
"type": "float32"
}
},
{
"name": "expand float32 3D tensor to 3D",
"inputs": {
"input": {
"shape": [1, 2, 1],
"data": [
21.694129943847656,
-72.82571411132812
],
"type": "float32"
}
},
"newShape": [2, 2, 6],
"expected": {
"name": "output",
"shape": [2, 2, 6],
"data": [
21.694129943847656,
21.694129943847656,
21.694129943847656,
21.694129943847656,
21.694129943847656,
21.694129943847656,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
21.694129943847656,
21.694129943847656,
21.694129943847656,
21.694129943847656,
21.694129943847656,
21.694129943847656,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812
],
"type": "float32"
}
},
{
"name": "expand float32 3D tensor to 4D",
"inputs": {
"input": {
"shape": [1, 2, 1],
"data": [
21.694129943847656,
-72.82571411132812
],
"type": "float32"
}
},
"newShape": [2, 2, 2, 3],
"expected": {
"name": "output",
"shape": [2, 2, 2, 3],
"data": [
21.694129943847656,
21.694129943847656,
21.694129943847656,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
21.694129943847656,
21.694129943847656,
21.694129943847656,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
21.694129943847656,
21.694129943847656,
21.694129943847656,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
21.694129943847656,
21.694129943847656,
21.694129943847656,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812
],
"type": "float32"
}
},
{
"name": "expand float32 3D tensor to 5D",
"inputs": {
"input": {
"shape": [1, 2, 1],
"data": [
21.694129943847656,
-72.82571411132812
],
"type": "float32"
}
},
"newShape": [2, 1, 2, 2, 3],
"expected": {
"name": "output",
"shape": [2, 1, 2, 2, 3],
"data": [
21.694129943847656,
21.694129943847656,
21.694129943847656,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
21.694129943847656,
21.694129943847656,
21.694129943847656,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
21.694129943847656,
21.694129943847656,
21.694129943847656,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812,
21.694129943847656,
21.694129943847656,
21.694129943847656,
-72.82571411132812,
-72.82571411132812,
-72.82571411132812
],
"type": "float32"
}
},
{
"name": "expand float32 4D tensor to 4D",
"inputs": {
"input": {
"shape": [2, 1, 1, 1],
"data": [
12.799123764038086,
-26.550199508666992
],
"type": "float32"
}
},
"newShape": [2, 3, 2, 2],
"expected": {
"name": "output",
"shape": [2, 3, 2, 2],
"data": [
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992
],
"type": "float32"
}
},
{
"name": "expand float32 4D tensor to 5D",
"inputs": {
"input": {
"shape": [2, 1, 1, 1],
"data": [
12.799123764038086,
-26.550199508666992
],
"type": "float32"
}
},
"newShape": [2, 2, 3, 1, 2],
"expected": {
"name": "output",
"shape": [2, 2, 3, 1, 2],
"data": [
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
12.799123764038086,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992,
-26.550199508666992
],
"type": "float32"
}
}
]
}