Source code

Revision control

Copy as Markdown

Other Tools

{
"tests": [
{
"name": "greaterOrEqual float32 0D scalar",
"inputs": {
"a": {
"shape": [],
"data": [
0.2829853513361833
],
"type": "float32"
},
"b": {
"shape": [],
"data": [
6.156983509735351
],
"type": "float32"
}
},
"expected": {
"shape": [],
"data": [
0
],
"type": "uint8"
}
},
{
"name": "greaterOrEqual float32 1D constant tensors",
"inputs": {
"a": {
"shape": [24],
"data": [
-8.049108184315305,
-5.522611295148119,
-2.097508268712267,
-7.455326346855671,
-5.4503762765457475,
9.802918209039795,
-3.6045179646016123,
4.088084930154503,
-5.068354954162224,
1.5821936652025705,
5.675583814922739,
-4.34159498166756,
1.6946222397391875,
2.926734617639429,
-7.000074175864097,
-2.5270822950013105,
1.4437268276959525,
7.862768559473771,
5.782288879751384,
1.8712013338616238,
-0.5233999645803635,
0.43433289218891247,
8.938365119196128,
1.65683957584843
],
"type": "float32",
"constant": true
},
"b": {
"shape": [24],
"data": [
-7.028095113692983,
1.9109992244501228,
3.576529209692282,
1.7167964605289043,
2.846137548919838,
-2.311762981138341,
-6.086130252861408,
-3.437926736129744,
-3.4764428213302656,
-2.194656398262036,
2.9962267558939892,
-5.540947945499273,
5.098470133217425,
6.775498827056623,
2.4505413384295913,
5.210598812779001,
-9.710094050019439,
-2.413028179599279,
8.678308853275162,
-9.449530756013411,
0.7702168987269076,
-1.518607415508292,
-9.15394321549195,
-4.9917360557925194
],
"type": "float32",
"constant": true
}
},
"expected": {
"shape": [24],
"data": [
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
1,
1,
0,
0,
0,
0,
1,
1,
0,
1,
0,
1,
1,
1
],
"type": "uint8"
}
},
{
"name": "greaterOrEqual float32 1D tensors",
"inputs": {
"a": {
"shape": [24],
"data": [
-8.049108184315305,
-5.522611295148119,
-2.097508268712267,
-7.455326346855671,
-5.4503762765457475,
9.802918209039795,
-3.6045179646016123,
4.088084930154503,
-5.068354954162224,
1.5821936652025705,
5.675583814922739,
-4.34159498166756,
1.6946222397391875,
2.926734617639429,
-7.000074175864097,
-2.5270822950013105,
1.4437268276959525,
7.862768559473771,
5.782288879751384,
1.8712013338616238,
-0.5233999645803635,
0.43433289218891247,
8.938365119196128,
1.65683957584843
],
"type": "float32"
},
"b": {
"shape": [24],
"data": [
-7.028095113692983,
1.9109992244501228,
3.576529209692282,
1.7167964605289043,
2.846137548919838,
-2.311762981138341,
-6.086130252861408,
-3.437926736129744,
-3.4764428213302656,
-2.194656398262036,
2.9962267558939892,
-5.540947945499273,
5.098470133217425,
6.775498827056623,
2.4505413384295913,
5.210598812779001,
-9.710094050019439,
-2.413028179599279,
8.678308853275162,
-9.449530756013411,
0.7702168987269076,
-1.518607415508292,
-9.15394321549195,
-4.9917360557925194
],
"type": "float32"
}
},
"expected": {
"shape": [24],
"data": [
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
1,
1,
0,
0,
0,
0,
1,
1,
0,
1,
0,
1,
1,
1
],
"type": "uint8"
}
},
{
"name": "greaterOrEqual float32 2D tensors",
"inputs": {
"a": {
"shape": [4, 6],
"data": [
-8.049108184315305,
-5.522611295148119,
-2.097508268712267,
-7.455326346855671,
-5.4503762765457475,
9.802918209039795,
-3.6045179646016123,
4.088084930154503,
-5.068354954162224,
1.5821936652025705,
5.675583814922739,
-4.34159498166756,
1.6946222397391875,
2.926734617639429,
-7.000074175864097,
-2.5270822950013105,
1.4437268276959525,
7.862768559473771,
5.782288879751384,
1.8712013338616238,
-0.5233999645803635,
0.43433289218891247,
8.938365119196128,
1.65683957584843
],
"type": "float32"
},
"b": {
"shape": [4, 6],
"data": [
-7.028095113692983,
1.9109992244501228,
3.576529209692282,
1.7167964605289043,
2.846137548919838,
-2.311762981138341,
-6.086130252861408,
-3.437926736129744,
-3.4764428213302656,
-2.194656398262036,
2.9962267558939892,
-5.540947945499273,
5.098470133217425,
6.775498827056623,
2.4505413384295913,
5.210598812779001,
-9.710094050019439,
-2.413028179599279,
8.678308853275162,
-9.449530756013411,
0.7702168987269076,
-1.518607415508292,
-9.15394321549195,
-4.9917360557925194
],
"type": "float32"
}
},
"expected": {
"shape": [4, 6],
"data": [
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
1,
1,
0,
0,
0,
0,
1,
1,
0,
1,
0,
1,
1,
1
],
"type": "uint8"
}
},
{
"name": "greaterOrEqual float32 3D tensors",
"inputs": {
"a": {
"shape": [2, 3, 4],
"data": [
-8.049108184315305,
-5.522611295148119,
-2.097508268712267,
-7.455326346855671,
-5.4503762765457475,
9.802918209039795,
-3.6045179646016123,
4.088084930154503,
-5.068354954162224,
1.5821936652025705,
5.675583814922739,
-4.34159498166756,
1.6946222397391875,
2.926734617639429,
-7.000074175864097,
-2.5270822950013105,
1.4437268276959525,
7.862768559473771,
5.782288879751384,
1.8712013338616238,
-0.5233999645803635,
0.43433289218891247,
8.938365119196128,
1.65683957584843
],
"type": "float32"
},
"b": {
"shape": [2, 3, 4],
"data": [
-7.028095113692983,
1.9109992244501228,
3.576529209692282,
1.7167964605289043,
2.846137548919838,
-2.311762981138341,
-6.086130252861408,
-3.437926736129744,
-3.4764428213302656,
-2.194656398262036,
2.9962267558939892,
-5.540947945499273,
5.098470133217425,
6.775498827056623,
2.4505413384295913,
5.210598812779001,
-9.710094050019439,
-2.413028179599279,
8.678308853275162,
-9.449530756013411,
0.7702168987269076,
-1.518607415508292,
-9.15394321549195,
-4.9917360557925194
],
"type": "float32"
}
},
"expected": {
"shape": [2, 3, 4],
"data": [
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
1,
1,
0,
0,
0,
0,
1,
1,
0,
1,
0,
1,
1,
1
],
"type": "uint8"
}
},
{
"name": "greaterOrEqual float32 4D tensors",
"inputs": {
"a": {
"shape": [2, 2, 2, 3],
"data": [
-8.049108184315305,
-5.522611295148119,
-2.097508268712267,
-7.455326346855671,
-5.4503762765457475,
9.802918209039795,
-3.6045179646016123,
4.088084930154503,
-5.068354954162224,
1.5821936652025705,
5.675583814922739,
-4.34159498166756,
1.6946222397391875,
2.926734617639429,
-7.000074175864097,
-2.5270822950013105,
1.4437268276959525,
7.862768559473771,
5.782288879751384,
1.8712013338616238,
-0.5233999645803635,
0.43433289218891247,
8.938365119196128,
1.65683957584843
],
"type": "float32"
},
"b": {
"shape": [2, 2, 2, 3],
"data": [
-7.028095113692983,
1.9109992244501228,
3.576529209692282,
1.7167964605289043,
2.846137548919838,
-2.311762981138341,
-6.086130252861408,
-3.437926736129744,
-3.4764428213302656,
-2.194656398262036,
2.9962267558939892,
-5.540947945499273,
5.098470133217425,
6.775498827056623,
2.4505413384295913,
5.210598812779001,
-9.710094050019439,
-2.413028179599279,
8.678308853275162,
-9.449530756013411,
0.7702168987269076,
-1.518607415508292,
-9.15394321549195,
-4.9917360557925194
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 2, 3],
"data": [
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
1,
1,
0,
0,
0,
0,
1,
1,
0,
1,
0,
1,
1,
1
],
"type": "uint8"
}
},
{
"name": "greaterOrEqual float32 5D tensors",
"inputs": {
"a": {
"shape": [2, 2, 1, 2, 3],
"data": [
-8.049108184315305,
-5.522611295148119,
-2.097508268712267,
-7.455326346855671,
-5.4503762765457475,
9.802918209039795,
-3.6045179646016123,
4.088084930154503,
-5.068354954162224,
1.5821936652025705,
5.675583814922739,
-4.34159498166756,
1.6946222397391875,
2.926734617639429,
-7.000074175864097,
-2.5270822950013105,
1.4437268276959525,
7.862768559473771,
5.782288879751384,
1.8712013338616238,
-0.5233999645803635,
0.43433289218891247,
8.938365119196128,
1.65683957584843
],
"type": "float32"
},
"b": {
"shape": [2, 2, 1, 2, 3],
"data": [
-7.028095113692983,
1.9109992244501228,
3.576529209692282,
1.7167964605289043,
2.846137548919838,
-2.311762981138341,
-6.086130252861408,
-3.437926736129744,
-3.4764428213302656,
-2.194656398262036,
2.9962267558939892,
-5.540947945499273,
5.098470133217425,
6.775498827056623,
2.4505413384295913,
5.210598812779001,
-9.710094050019439,
-2.413028179599279,
8.678308853275162,
-9.449530756013411,
0.7702168987269076,
-1.518607415508292,
-9.15394321549195,
-4.9917360557925194
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 1, 2, 3],
"data": [
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
1,
1,
0,
0,
0,
0,
1,
1,
0,
1,
0,
1,
1,
1
],
"type": "uint8"
}
},
{
"name": "greaterOrEqual float32 broadcast 0D to 4D",
"inputs": {
"a": {
"shape": [],
"data": [
-1.0187572964482339
],
"type": "float32"
},
"b": {
"shape": [2, 2, 2, 3],
"data": [
-8.049108184315305,
-5.522611295148119,
-2.097508268712267,
-7.455326346855671,
-5.4503762765457475,
9.802918209039795,
-3.6045179646016123,
4.088084930154503,
-5.068354954162224,
1.5821936652025705,
5.675583814922739,
-4.34159498166756,
1.6946222397391875,
2.926734617639429,
-7.000074175864097,
-2.5270822950013105,
1.4437268276959525,
7.862768559473771,
5.782288879751384,
1.8712013338616238,
-0.5233999645803635,
0.43433289218891247,
8.938365119196128,
1.65683957584843
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 2, 3],
"data": [
1,
1,
1,
1,
1,
0,
1,
0,
1,
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
],
"type": "uint8"
}
},
{
"name": "greaterOrEqual float32 broadcast 1D to 4D",
"inputs": {
"a": {
"shape": [1],
"data": [
-1.0187572964482339
],
"type": "float32"
},
"b": {
"shape": [2, 2, 2, 3],
"data": [
-8.049108184315305,
-5.522611295148119,
-2.097508268712267,
-7.455326346855671,
-5.4503762765457475,
9.802918209039795,
-3.6045179646016123,
4.088084930154503,
-5.068354954162224,
1.5821936652025705,
5.675583814922739,
-4.34159498166756,
1.6946222397391875,
2.926734617639429,
-7.000074175864097,
-2.5270822950013105,
1.4437268276959525,
7.862768559473771,
5.782288879751384,
1.8712013338616238,
-0.5233999645803635,
0.43433289218891247,
8.938365119196128,
1.65683957584843
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 2, 3],
"data": [
1,
1,
1,
1,
1,
0,
1,
0,
1,
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
],
"type": "uint8"
}
},
{
"name": "greaterOrEqual float32 broadcast 2D to 4D",
"inputs": {
"a": {
"shape": [2, 2, 2, 3],
"data": [
-8.049108184315305,
-5.522611295148119,
-2.097508268712267,
-7.455326346855671,
-5.4503762765457475,
9.802918209039795,
-3.6045179646016123,
4.088084930154503,
-5.068354954162224,
1.5821936652025705,
5.675583814922739,
-4.34159498166756,
1.6946222397391875,
2.926734617639429,
-7.000074175864097,
-2.5270822950013105,
1.4437268276959525,
7.862768559473771,
5.782288879751384,
1.8712013338616238,
-0.5233999645803635,
0.43433289218891247,
8.938365119196128,
1.65683957584843
],
"type": "float32"
},
"b": {
"shape": [2, 3],
"data": [
-4.19451362795888,
3.8917840404002177,
-3.5139974150349484,
6.279316420756992,
0.0017881708061917578,
-0.7928582491851124
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 2, 3],
"data": [
0,
0,
1,
0,
0,
1,
1,
1,
0,
0,
1,
0,
1,
0,
0,
0,
1,
1,
1,
0,
1,
0,
1,
1
],
"type": "uint8"
}
},
{
"name": "greaterOrEqual float32 broadcast 3D to 4D",
"inputs": {
"a": {
"shape": [2, 2, 2, 3],
"data": [
-8.049108184315305,
-5.522611295148119,
-2.097508268712267,
-7.455326346855671,
-5.4503762765457475,
9.802918209039795,
-3.6045179646016123,
4.088084930154503,
-5.068354954162224,
1.5821936652025705,
5.675583814922739,
-4.34159498166756,
1.6946222397391875,
2.926734617639429,
-7.000074175864097,
-2.5270822950013105,
1.4437268276959525,
7.862768559473771,
5.782288879751384,
1.8712013338616238,
-0.5233999645803635,
0.43433289218891247,
8.938365119196128,
1.65683957584843
],
"type": "float32"
},
"b": {
"shape": [2, 2, 1],
"data": [
-3.282304702993888,
-1.397563682654157,
0.4905360718662557,
-6.882648917469618
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 2, 3],
"data": [
0,
0,
1,
0,
0,
1,
0,
1,
0,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
0,
1,
1,
1
],
"type": "uint8"
}
},
{
"name": "greaterOrEqual float32 broadcast 4D to 4D",
"inputs": {
"a": {
"shape": [1, 1, 1, 1],
"data": [
-1.0187572964482339
],
"type": "float32"
},
"b": {
"shape": [2, 2, 2, 3],
"data": [
-8.049108184315305,
-5.522611295148119,
-2.097508268712267,
-7.455326346855671,
-5.4503762765457475,
9.802918209039795,
-3.6045179646016123,
4.088084930154503,
-5.068354954162224,
1.5821936652025705,
5.675583814922739,
-4.34159498166756,
1.6946222397391875,
2.926734617639429,
-7.000074175864097,
-2.5270822950013105,
1.4437268276959525,
7.862768559473771,
5.782288879751384,
1.8712013338616238,
-0.5233999645803635,
0.43433289218891247,
8.938365119196128,
1.65683957584843
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 2, 3],
"data": [
1,
1,
1,
1,
1,
0,
1,
0,
1,
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
],
"type": "uint8"
}
}
]
}