Source code

Revision control

Copy as Markdown

Other Tools

{
"tests": [
{
"name": "lesser float32 0D scalar",
"inputs": {
"a": {
"shape": [],
"data": [
-0.5228080371919397
],
"type": "float32"
},
"b": {
"shape": [],
"data": [
0.8150388698055
],
"type": "float32"
}
},
"expected": {
"shape": [],
"data": [
1
],
"type": "uint8"
}
},
{
"name": "lesser float32 1D constant tensors",
"inputs": {
"a": {
"shape": [24],
"data": [
-1.1472189199107738,
-8.409373914977403,
-2.2753309465448535,
-0.5770801181952088,
8.171789524073006,
-0.907120961653046,
5.290845327676683,
-3.9134646002455975,
9.825094822582592,
-8.931730412646708,
-3.4574016573266553,
-7.331231867596579,
1.2320041500405665,
4.312076818806343,
1.2715546106634825,
4.184540686856884,
-6.710920186561022,
3.0768423616317655,
1.0030865825397903,
-9.076244529342748,
8.907161848861044,
4.232614785327211,
2.1005889661509425,
-6.201345656840638
],
"type": "float32",
"constant": true
},
"b": {
"shape": [24],
"data": [
2.9453755897484726,
3.7304716829497266,
4.025375190729793,
-4.718355239722074,
6.773274305103257,
-2.042813441289626,
-6.526761957285996,
6.826299715878466,
-9.267172939567224,
6.118424090729771,
-2.0017322775193014,
1.779831042224643,
9.660093887317394,
-2.7473158972960476,
-3.4345008109025033,
-4.7510974486127955,
-6.092621934151237,
-0.43348063367342426,
-1.4069053013420518,
-0.23742098855005445,
-9.105970612932852,
6.811780042167808,
-6.768326860738436,
-8.952353121501568
],
"type": "float32",
"constant": true
}
},
"expected": {
"shape": [24],
"data": [
1,
1,
1,
0,
0,
0,
0,
1,
0,
1,
1,
1,
1,
0,
0,
0,
1,
0,
0,
1,
0,
1,
0,
0
],
"type": "uint8"
}
},
{
"name": "lesser float32 1D tensors",
"inputs": {
"a": {
"shape": [24],
"data": [
-1.1472189199107738,
-8.409373914977403,
-2.2753309465448535,
-0.5770801181952088,
8.171789524073006,
-0.907120961653046,
5.290845327676683,
-3.9134646002455975,
9.825094822582592,
-8.931730412646708,
-3.4574016573266553,
-7.331231867596579,
1.2320041500405665,
4.312076818806343,
1.2715546106634825,
4.184540686856884,
-6.710920186561022,
3.0768423616317655,
1.0030865825397903,
-9.076244529342748,
8.907161848861044,
4.232614785327211,
2.1005889661509425,
-6.201345656840638
],
"type": "float32"
},
"b": {
"shape": [24],
"data": [
2.9453755897484726,
3.7304716829497266,
4.025375190729793,
-4.718355239722074,
6.773274305103257,
-2.042813441289626,
-6.526761957285996,
6.826299715878466,
-9.267172939567224,
6.118424090729771,
-2.0017322775193014,
1.779831042224643,
9.660093887317394,
-2.7473158972960476,
-3.4345008109025033,
-4.7510974486127955,
-6.092621934151237,
-0.43348063367342426,
-1.4069053013420518,
-0.23742098855005445,
-9.105970612932852,
6.811780042167808,
-6.768326860738436,
-8.952353121501568
],
"type": "float32"
}
},
"expected": {
"shape": [24],
"data": [
1,
1,
1,
0,
0,
0,
0,
1,
0,
1,
1,
1,
1,
0,
0,
0,
1,
0,
0,
1,
0,
1,
0,
0
],
"type": "uint8"
}
},
{
"name": "lesser float32 2D tensors",
"inputs": {
"a": {
"shape": [4, 6],
"data": [
-1.1472189199107738,
-8.409373914977403,
-2.2753309465448535,
-0.5770801181952088,
8.171789524073006,
-0.907120961653046,
5.290845327676683,
-3.9134646002455975,
9.825094822582592,
-8.931730412646708,
-3.4574016573266553,
-7.331231867596579,
1.2320041500405665,
4.312076818806343,
1.2715546106634825,
4.184540686856884,
-6.710920186561022,
3.0768423616317655,
1.0030865825397903,
-9.076244529342748,
8.907161848861044,
4.232614785327211,
2.1005889661509425,
-6.201345656840638
],
"type": "float32"
},
"b": {
"shape": [4, 6],
"data": [
2.9453755897484726,
3.7304716829497266,
4.025375190729793,
-4.718355239722074,
6.773274305103257,
-2.042813441289626,
-6.526761957285996,
6.826299715878466,
-9.267172939567224,
6.118424090729771,
-2.0017322775193014,
1.779831042224643,
9.660093887317394,
-2.7473158972960476,
-3.4345008109025033,
-4.7510974486127955,
-6.092621934151237,
-0.43348063367342426,
-1.4069053013420518,
-0.23742098855005445,
-9.105970612932852,
6.811780042167808,
-6.768326860738436,
-8.952353121501568
],
"type": "float32"
}
},
"expected": {
"shape": [4, 6],
"data": [
1,
1,
1,
0,
0,
0,
0,
1,
0,
1,
1,
1,
1,
0,
0,
0,
1,
0,
0,
1,
0,
1,
0,
0
],
"type": "uint8"
}
},
{
"name": "lesser float32 3D tensors",
"inputs": {
"a": {
"shape": [2, 3, 4],
"data": [
-1.1472189199107738,
-8.409373914977403,
-2.2753309465448535,
-0.5770801181952088,
8.171789524073006,
-0.907120961653046,
5.290845327676683,
-3.9134646002455975,
9.825094822582592,
-8.931730412646708,
-3.4574016573266553,
-7.331231867596579,
1.2320041500405665,
4.312076818806343,
1.2715546106634825,
4.184540686856884,
-6.710920186561022,
3.0768423616317655,
1.0030865825397903,
-9.076244529342748,
8.907161848861044,
4.232614785327211,
2.1005889661509425,
-6.201345656840638
],
"type": "float32"
},
"b": {
"shape": [2, 3, 4],
"data": [
2.9453755897484726,
3.7304716829497266,
4.025375190729793,
-4.718355239722074,
6.773274305103257,
-2.042813441289626,
-6.526761957285996,
6.826299715878466,
-9.267172939567224,
6.118424090729771,
-2.0017322775193014,
1.779831042224643,
9.660093887317394,
-2.7473158972960476,
-3.4345008109025033,
-4.7510974486127955,
-6.092621934151237,
-0.43348063367342426,
-1.4069053013420518,
-0.23742098855005445,
-9.105970612932852,
6.811780042167808,
-6.768326860738436,
-8.952353121501568
],
"type": "float32"
}
},
"expected": {
"shape": [2, 3, 4],
"data": [
1,
1,
1,
0,
0,
0,
0,
1,
0,
1,
1,
1,
1,
0,
0,
0,
1,
0,
0,
1,
0,
1,
0,
0
],
"type": "uint8"
}
},
{
"name": "lesser float32 4D tensors",
"inputs": {
"a": {
"shape": [2, 2, 2, 3],
"data": [
-1.1472189199107738,
-8.409373914977403,
-2.2753309465448535,
-0.5770801181952088,
8.171789524073006,
-0.907120961653046,
5.290845327676683,
-3.9134646002455975,
9.825094822582592,
-8.931730412646708,
-3.4574016573266553,
-7.331231867596579,
1.2320041500405665,
4.312076818806343,
1.2715546106634825,
4.184540686856884,
-6.710920186561022,
3.0768423616317655,
1.0030865825397903,
-9.076244529342748,
8.907161848861044,
4.232614785327211,
2.1005889661509425,
-6.201345656840638
],
"type": "float32"
},
"b": {
"shape": [2, 2, 2, 3],
"data": [
2.9453755897484726,
3.7304716829497266,
4.025375190729793,
-4.718355239722074,
6.773274305103257,
-2.042813441289626,
-6.526761957285996,
6.826299715878466,
-9.267172939567224,
6.118424090729771,
-2.0017322775193014,
1.779831042224643,
9.660093887317394,
-2.7473158972960476,
-3.4345008109025033,
-4.7510974486127955,
-6.092621934151237,
-0.43348063367342426,
-1.4069053013420518,
-0.23742098855005445,
-9.105970612932852,
6.811780042167808,
-6.768326860738436,
-8.952353121501568
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 2, 3],
"data": [
1,
1,
1,
0,
0,
0,
0,
1,
0,
1,
1,
1,
1,
0,
0,
0,
1,
0,
0,
1,
0,
1,
0,
0
],
"type": "uint8"
}
},
{
"name": "lesser float32 5D tensors",
"inputs": {
"a": {
"shape": [2, 2, 1, 2, 3],
"data": [
-1.1472189199107738,
-8.409373914977403,
-2.2753309465448535,
-0.5770801181952088,
8.171789524073006,
-0.907120961653046,
5.290845327676683,
-3.9134646002455975,
9.825094822582592,
-8.931730412646708,
-3.4574016573266553,
-7.331231867596579,
1.2320041500405665,
4.312076818806343,
1.2715546106634825,
4.184540686856884,
-6.710920186561022,
3.0768423616317655,
1.0030865825397903,
-9.076244529342748,
8.907161848861044,
4.232614785327211,
2.1005889661509425,
-6.201345656840638
],
"type": "float32"
},
"b": {
"shape": [2, 2, 1, 2, 3],
"data": [
2.9453755897484726,
3.7304716829497266,
4.025375190729793,
-4.718355239722074,
6.773274305103257,
-2.042813441289626,
-6.526761957285996,
6.826299715878466,
-9.267172939567224,
6.118424090729771,
-2.0017322775193014,
1.779831042224643,
9.660093887317394,
-2.7473158972960476,
-3.4345008109025033,
-4.7510974486127955,
-6.092621934151237,
-0.43348063367342426,
-1.4069053013420518,
-0.23742098855005445,
-9.105970612932852,
6.811780042167808,
-6.768326860738436,
-8.952353121501568
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 1, 2, 3],
"data": [
1,
1,
1,
0,
0,
0,
0,
1,
0,
1,
1,
1,
1,
0,
0,
0,
1,
0,
0,
1,
0,
1,
0,
0
],
"type": "uint8"
}
},
{
"name": "lesser float32 broadcast 0D to 4D",
"inputs": {
"a": {
"shape": [],
"data": [
-5.678369818327527
],
"type": "float32"
},
"b": {
"shape": [2, 2, 2, 3],
"data": [
-1.1472189199107738,
-8.409373914977403,
-2.2753309465448535,
-0.5770801181952088,
8.171789524073006,
-0.907120961653046,
5.290845327676683,
-3.9134646002455975,
9.825094822582592,
-8.931730412646708,
-3.4574016573266553,
-7.331231867596579,
1.2320041500405665,
4.312076818806343,
1.2715546106634825,
4.184540686856884,
-6.710920186561022,
3.0768423616317655,
1.0030865825397903,
-9.076244529342748,
8.907161848861044,
4.232614785327211,
2.1005889661509425,
-6.201345656840638
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 2, 3],
"data": [
1,
0,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
1,
1,
1,
0,
1,
1,
0,
1,
1,
1,
0
],
"type": "uint8"
}
},
{
"name": "lesser float32 broadcast 1D to 4D",
"inputs": {
"a": {
"shape": [1],
"data": [
-5.678369818327527
],
"type": "float32"
},
"b": {
"shape": [2, 2, 2, 3],
"data": [
-1.1472189199107738,
-8.409373914977403,
-2.2753309465448535,
-0.5770801181952088,
8.171789524073006,
-0.907120961653046,
5.290845327676683,
-3.9134646002455975,
9.825094822582592,
-8.931730412646708,
-3.4574016573266553,
-7.331231867596579,
1.2320041500405665,
4.312076818806343,
1.2715546106634825,
4.184540686856884,
-6.710920186561022,
3.0768423616317655,
1.0030865825397903,
-9.076244529342748,
8.907161848861044,
4.232614785327211,
2.1005889661509425,
-6.201345656840638
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 2, 3],
"data": [
1,
0,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
1,
1,
1,
0,
1,
1,
0,
1,
1,
1,
0
],
"type": "uint8"
}
},
{
"name": "lesser float32 broadcast 2D to 4D",
"inputs": {
"a": {
"shape": [2, 2, 2, 3],
"data": [
-1.1472189199107738,
-8.409373914977403,
-2.2753309465448535,
-0.5770801181952088,
8.171789524073006,
-0.907120961653046,
5.290845327676683,
-3.9134646002455975,
9.825094822582592,
-8.931730412646708,
-3.4574016573266553,
-7.331231867596579,
1.2320041500405665,
4.312076818806343,
1.2715546106634825,
4.184540686856884,
-6.710920186561022,
3.0768423616317655,
1.0030865825397903,
-9.076244529342748,
8.907161848861044,
4.232614785327211,
2.1005889661509425,
-6.201345656840638
],
"type": "float32"
},
"b": {
"shape": [2, 3],
"data":[
3.5869946313397314,
-2.8533321455054805,
-3.684652687308483,
2.4055018033797815,
-4.358371438779294,
5.5484749560652915
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 2, 3],
"data": [
1,
1,
0,
1,
0,
1,
0,
1,
0,
1,
0,
1,
1,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
1
],
"type": "uint8"
}
},
{
"name": "lesser float32 broadcast 3D to 4D",
"inputs": {
"a": {
"shape": [2, 2, 2, 3],
"data": [
-1.1472189199107738,
-8.409373914977403,
-2.2753309465448535,
-0.5770801181952088,
8.171789524073006,
-0.907120961653046,
5.290845327676683,
-3.9134646002455975,
9.825094822582592,
-8.931730412646708,
-3.4574016573266553,
-7.331231867596579,
1.2320041500405665,
4.312076818806343,
1.2715546106634825,
4.184540686856884,
-6.710920186561022,
3.0768423616317655,
1.0030865825397903,
-9.076244529342748,
8.907161848861044,
4.232614785327211,
2.1005889661509425,
-6.201345656840638
],
"type": "float32"
},
"b": {
"shape": [2, 2, 1],
"data": [
-4.439523740453941,
2.751832334938049,
3.6359436309279225,
-2.808992101634189
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 2, 3],
"data": [
0,
1,
0,
1,
0,
1,
0,
1,
0,
1,
1,
1,
0,
0,
0,
0,
1,
0,
1,
1,
0,
0,
0,
1
],
"type": "uint8"
}
},
{
"name": "lesser float32 broadcast 4D to 4D",
"inputs": {
"a": {
"shape": [1, 1, 1, 1],
"data": [
-5.678369818327527
],
"type": "float32"
},
"b": {
"shape": [2, 2, 2, 3],
"data": [
-1.1472189199107738,
-8.409373914977403,
-2.2753309465448535,
-0.5770801181952088,
8.171789524073006,
-0.907120961653046,
5.290845327676683,
-3.9134646002455975,
9.825094822582592,
-8.931730412646708,
-3.4574016573266553,
-7.331231867596579,
1.2320041500405665,
4.312076818806343,
1.2715546106634825,
4.184540686856884,
-6.710920186561022,
3.0768423616317655,
1.0030865825397903,
-9.076244529342748,
8.907161848861044,
4.232614785327211,
2.1005889661509425,
-6.201345656840638
],
"type": "float32"
}
},
"expected": {
"shape": [2, 2, 2, 3],
"data": [
1,
0,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
1,
1,
1,
0,
1,
1,
0,
1,
1,
1,
0
],
"type": "uint8"
}
}
]
}