{ "tests": [ { "name": "sub float32 1D constant tensors", "inputs": { "a": { "shape": [24], "data": [ 73.59273411765761, 14.484682970108636, -69.40201711151408, -52.04528488626416, -75.78136877111933, -2.274051445061204, -83.29907743841476, 15.57776886289956, -62.70080421291606, 32.95400351079056, 82.55709225645836, -74.90638758877455, 78.22299428029646, 48.39240254947623, -19.153541450651716, -85.93221227232242, 89.12354776921964, 22.874629248059804, 80.56973297595874, 97.62598337281631, 52.74850952689357, 89.16604046945432, -20.503417738603375, 99.48707602133317 ], "type": "float32", "constant": true }, "b": { "shape": [24], "data": [ -49.12813049327167, 40.189291278955295, 7.224666637037913, 89.26004842468907, -81.43340528622471, 59.61165817521396, 11.234410659855328, 48.884057695505845, 85.26825586730342, 27.6952967767901, 30.989454126839945, -38.1290365096719, -83.14809826804765, -86.16174952283208, 16.758884614336495, 46.128898841129086, -28.432477462364687, 28.229338368319986, 35.23646170623519, -77.05516625176658, -57.8714723086966, -58.15086093387936, 27.48886675763096, 31.998020251913943 ], "type": "float32", "constant": true } }, "expected": { "name": "output", "shape": [24], "data": [ 122.72087097167969, -25.704608917236328, -76.62667846679688, -141.30532836914062, 5.652030944824219, -61.885711669921875, -94.53349304199219, -33.3062858581543, -147.96905517578125, 5.258705139160156, 51.56763458251953, -36.77735137939453, 161.37109375, 134.5541534423828, -35.91242599487305, -132.0611114501953, 117.5560302734375, -5.354707717895508, 45.33327102661133, 174.68115234375, 110.61997985839844, 147.31689453125, -47.992286682128906, 67.48905944824219 ], "type": "float32" } }, { "name": "sub float32 1D tensors", "inputs": { "a": { "shape": [24], "data": [ 73.59273411765761, 14.484682970108636, -69.40201711151408, -52.04528488626416, -75.78136877111933, -2.274051445061204, -83.29907743841476, 15.57776886289956, -62.70080421291606, 32.95400351079056, 82.55709225645836, -74.90638758877455, 78.22299428029646, 48.39240254947623, -19.153541450651716, -85.93221227232242, 89.12354776921964, 22.874629248059804, 80.56973297595874, 97.62598337281631, 52.74850952689357, 89.16604046945432, -20.503417738603375, 99.48707602133317 ], "type": "float32" }, "b": { "shape": [24], "data": [ -49.12813049327167, 40.189291278955295, 7.224666637037913, 89.26004842468907, -81.43340528622471, 59.61165817521396, 11.234410659855328, 48.884057695505845, 85.26825586730342, 27.6952967767901, 30.989454126839945, -38.1290365096719, -83.14809826804765, -86.16174952283208, 16.758884614336495, 46.128898841129086, -28.432477462364687, 28.229338368319986, 35.23646170623519, -77.05516625176658, -57.8714723086966, -58.15086093387936, 27.48886675763096, 31.998020251913943 ], "type": "float32" } }, "expected": { "name": "output", "shape": [24], "data": [ 122.72087097167969, -25.704608917236328, -76.62667846679688, -141.30532836914062, 5.652030944824219, -61.885711669921875, -94.53349304199219, -33.3062858581543, -147.96905517578125, 5.258705139160156, 51.56763458251953, -36.77735137939453, 161.37109375, 134.5541534423828, -35.91242599487305, -132.0611114501953, 117.5560302734375, -5.354707717895508, 45.33327102661133, 174.68115234375, 110.61997985839844, 147.31689453125, -47.992286682128906, 67.48905944824219 ], "type": "float32" } }, { "name": "sub float32 2D tensors", "inputs": { "a": { "shape": [4, 6], "data": [ 73.59273411765761, 14.484682970108636, -69.40201711151408, -52.04528488626416, -75.78136877111933, -2.274051445061204, -83.29907743841476, 15.57776886289956, -62.70080421291606, 32.95400351079056, 82.55709225645836, -74.90638758877455, 78.22299428029646, 48.39240254947623, -19.153541450651716, -85.93221227232242, 89.12354776921964, 22.874629248059804, 80.56973297595874, 97.62598337281631, 52.74850952689357, 89.16604046945432, -20.503417738603375, 99.48707602133317 ], "type": "float32" }, "b": { "shape": [4, 6], "data": [ -49.12813049327167, 40.189291278955295, 7.224666637037913, 89.26004842468907, -81.43340528622471, 59.61165817521396, 11.234410659855328, 48.884057695505845, 85.26825586730342, 27.6952967767901, 30.989454126839945, -38.1290365096719, -83.14809826804765, -86.16174952283208, 16.758884614336495, 46.128898841129086, -28.432477462364687, 28.229338368319986, 35.23646170623519, -77.05516625176658, -57.8714723086966, -58.15086093387936, 27.48886675763096, 31.998020251913943 ], "type": "float32" } }, "expected": { "name": "output", "shape": [4, 6], "data": [ 122.72087097167969, -25.704608917236328, -76.62667846679688, -141.30532836914062, 5.652030944824219, -61.885711669921875, -94.53349304199219, -33.3062858581543, -147.96905517578125, 5.258705139160156, 51.56763458251953, -36.77735137939453, 161.37109375, 134.5541534423828, -35.91242599487305, -132.0611114501953, 117.5560302734375, -5.354707717895508, 45.33327102661133, 174.68115234375, 110.61997985839844, 147.31689453125, -47.992286682128906, 67.48905944824219 ], "type": "float32" } }, { "name": "sub float32 3D tensors", "inputs": { "a": { "shape": [2, 3, 4], "data": [ 73.59273411765761, 14.484682970108636, -69.40201711151408, -52.04528488626416, -75.78136877111933, -2.274051445061204, -83.29907743841476, 15.57776886289956, -62.70080421291606, 32.95400351079056, 82.55709225645836, -74.90638758877455, 78.22299428029646, 48.39240254947623, -19.153541450651716, -85.93221227232242, 89.12354776921964, 22.874629248059804, 80.56973297595874, 97.62598337281631, 52.74850952689357, 89.16604046945432, -20.503417738603375, 99.48707602133317 ], "type": "float32" }, "b": { "shape": [2, 3, 4], "data": [ -49.12813049327167, 40.189291278955295, 7.224666637037913, 89.26004842468907, -81.43340528622471, 59.61165817521396, 11.234410659855328, 48.884057695505845, 85.26825586730342, 27.6952967767901, 30.989454126839945, -38.1290365096719, -83.14809826804765, -86.16174952283208, 16.758884614336495, 46.128898841129086, -28.432477462364687, 28.229338368319986, 35.23646170623519, -77.05516625176658, -57.8714723086966, -58.15086093387936, 27.48886675763096, 31.998020251913943 ], "type": "float32" } }, "expected": { "name": "output", "shape": [2, 3, 4], "data": [ 122.72087097167969, -25.704608917236328, -76.62667846679688, -141.30532836914062, 5.652030944824219, -61.885711669921875, -94.53349304199219, -33.3062858581543, -147.96905517578125, 5.258705139160156, 51.56763458251953, -36.77735137939453, 161.37109375, 134.5541534423828, -35.91242599487305, -132.0611114501953, 117.5560302734375, -5.354707717895508, 45.33327102661133, 174.68115234375, 110.61997985839844, 147.31689453125, -47.992286682128906, 67.48905944824219 ], "type": "float32" } }, { "name": "sub float32 4D tensors", "inputs": { "a": { "shape": [2, 2, 2, 3], "data": [ 73.59273411765761, 14.484682970108636, -69.40201711151408, -52.04528488626416, -75.78136877111933, -2.274051445061204, -83.29907743841476, 15.57776886289956, -62.70080421291606, 32.95400351079056, 82.55709225645836, -74.90638758877455, 78.22299428029646, 48.39240254947623, -19.153541450651716, -85.93221227232242, 89.12354776921964, 22.874629248059804, 80.56973297595874, 97.62598337281631, 52.74850952689357, 89.16604046945432, -20.503417738603375, 99.48707602133317 ], "type": "float32" }, "b": { "shape": [2, 2, 2, 3], "data": [ -49.12813049327167, 40.189291278955295, 7.224666637037913, 89.26004842468907, -81.43340528622471, 59.61165817521396, 11.234410659855328, 48.884057695505845, 85.26825586730342, 27.6952967767901, 30.989454126839945, -38.1290365096719, -83.14809826804765, -86.16174952283208, 16.758884614336495, 46.128898841129086, -28.432477462364687, 28.229338368319986, 35.23646170623519, -77.05516625176658, -57.8714723086966, -58.15086093387936, 27.48886675763096, 31.998020251913943 ], "type": "float32" } }, "expected": { "name": "output", "shape": [2, 2, 2, 3], "data": [ 122.72087097167969, -25.704608917236328, -76.62667846679688, -141.30532836914062, 5.652030944824219, -61.885711669921875, -94.53349304199219, -33.3062858581543, -147.96905517578125, 5.258705139160156, 51.56763458251953, -36.77735137939453, 161.37109375, 134.5541534423828, -35.91242599487305, -132.0611114501953, 117.5560302734375, -5.354707717895508, 45.33327102661133, 174.68115234375, 110.61997985839844, 147.31689453125, -47.992286682128906, 67.48905944824219 ], "type": "float32" } }, { "name": "sub float32 5D tensors", "inputs": { "a": { "shape": [2, 2, 1, 2, 3], "data": [ 73.59273411765761, 14.484682970108636, -69.40201711151408, -52.04528488626416, -75.78136877111933, -2.274051445061204, -83.29907743841476, 15.57776886289956, -62.70080421291606, 32.95400351079056, 82.55709225645836, -74.90638758877455, 78.22299428029646, 48.39240254947623, -19.153541450651716, -85.93221227232242, 89.12354776921964, 22.874629248059804, 80.56973297595874, 97.62598337281631, 52.74850952689357, 89.16604046945432, -20.503417738603375, 99.48707602133317 ], "type": "float32" }, "b": { "shape": [2, 2, 1, 2, 3], "data": [ -49.12813049327167, 40.189291278955295, 7.224666637037913, 89.26004842468907, -81.43340528622471, 59.61165817521396, 11.234410659855328, 48.884057695505845, 85.26825586730342, 27.6952967767901, 30.989454126839945, -38.1290365096719, -83.14809826804765, -86.16174952283208, 16.758884614336495, 46.128898841129086, -28.432477462364687, 28.229338368319986, 35.23646170623519, -77.05516625176658, -57.8714723086966, -58.15086093387936, 27.48886675763096, 31.998020251913943 ], "type": "float32" } }, "expected": { "name": "output", "shape": [2, 2, 1, 2, 3], "data": [ 122.72087097167969, -25.704608917236328, -76.62667846679688, -141.30532836914062, 5.652030944824219, -61.885711669921875, -94.53349304199219, -33.3062858581543, -147.96905517578125, 5.258705139160156, 51.56763458251953, -36.77735137939453, 161.37109375, 134.5541534423828, -35.91242599487305, -132.0611114501953, 117.5560302734375, -5.354707717895508, 45.33327102661133, 174.68115234375, 110.61997985839844, 147.31689453125, -47.992286682128906, 67.48905944824219 ], "type": "float32" } }, { "name": "sub float32 broadcast 1D to 4D", "inputs": { "a": { "shape": [1], "data": [ -97.04911633292723 ], "type": "float32" }, "b": { "shape": [2, 2, 2, 3], "data": [ 73.59273411765761, 14.484682970108636, -69.40201711151408, -52.04528488626416, -75.78136877111933, -2.274051445061204, -83.29907743841476, 15.57776886289956, -62.70080421291606, 32.95400351079056, 82.55709225645836, -74.90638758877455, 78.22299428029646, 48.39240254947623, -19.153541450651716, -85.93221227232242, 89.12354776921964, 22.874629248059804, 80.56973297595874, 97.62598337281631, 52.74850952689357, 89.16604046945432, -20.503417738603375, 99.48707602133317 ], "type": "float32" } }, "expected": { "name": "output", "shape": [2, 2, 2, 3], "data": [ -170.641845703125, -111.53379821777344, -27.64710235595703, -45.00383377075195, -21.267745971679688, -94.77507019042969, -13.750038146972656, -112.62688446044922, -34.34831237792969, -130.00311279296875, -179.606201171875, -22.142730712890625, -175.27210998535156, -145.4415283203125, -77.89557647705078, -11.116905212402344, -186.17266845703125, -119.92375183105469, -177.6188507080078, -194.67510986328125, -149.79762268066406, -186.21514892578125, -76.54570007324219, -196.53619384765625 ], "type": "float32" } }, { "name": "sub float32 broadcast 2D to 4D", "inputs": { "a": { "shape": [2, 2, 2, 3], "data": [ 73.59273411765761, 14.484682970108636, -69.40201711151408, -52.04528488626416, -75.78136877111933, -2.274051445061204, -83.29907743841476, 15.57776886289956, -62.70080421291606, 32.95400351079056, 82.55709225645836, -74.90638758877455, 78.22299428029646, 48.39240254947623, -19.153541450651716, -85.93221227232242, 89.12354776921964, 22.874629248059804, 80.56973297595874, 97.62598337281631, 52.74850952689357, 89.16604046945432, -20.503417738603375, 99.48707602133317 ], "type": "float32" }, "b": { "shape": [2, 3], "data": [ 10.76283817728796, -90.23991799972681, 12.787367580497303, -62.44633978281189, 32.182575156356904, 20.35949259849579 ], "type": "float32" } }, "expected": { "name": "output", "shape": [2, 2, 2, 3], "data": [ 62.82989501953125, 104.72460174560547, -82.18938446044922, 10.401054382324219, -107.96394348144531, -22.633544921875, -94.06192016601562, 105.81768798828125, -75.48817443847656, 95.40034484863281, 50.374515533447266, -95.26588439941406, 67.46015167236328, 138.63232421875, -31.94091033935547, -23.48587417602539, 56.940975189208984, 2.51513671875, 69.80689239501953, 187.86590576171875, 39.96113967895508, 151.6123809814453, -52.68599319458008, 79.12757873535156 ], "type": "float32" } }, { "name": "sub float32 broadcast 3D to 4D", "inputs": { "a": { "shape": [2, 2, 2, 3], "data": [ 73.59273411765761, 14.484682970108636, -69.40201711151408, -52.04528488626416, -75.78136877111933, -2.274051445061204, -83.29907743841476, 15.57776886289956, -62.70080421291606, 32.95400351079056, 82.55709225645836, -74.90638758877455, 78.22299428029646, 48.39240254947623, -19.153541450651716, -85.93221227232242, 89.12354776921964, 22.874629248059804, 80.56973297595874, 97.62598337281631, 52.74850952689357, 89.16604046945432, -20.503417738603375, 99.48707602133317 ], "type": "float32" }, "b": { "shape": [2, 2, 1], "data": [ -8.393114200101877, 75.54752975621165, -32.32586947927443, 8.088332085081447 ], "type": "float32" } }, "expected": { "name": "output", "shape": [2, 2, 2, 3], "data": [ 81.98584747314453, 22.877796173095703, -61.00890350341797, -127.59281921386719, -151.3289031982422, -77.82157897949219, -50.973209381103516, 47.90364074707031, -30.374935150146484, 24.86566925048828, 74.46875762939453, -82.99472045898438, 86.61610412597656, 56.78551483154297, -10.760427474975586, -161.479736328125, 13.576019287109375, -52.67290115356445, 112.89559936523438, 129.9518585205078, 85.07437896728516, 81.07770538330078, -28.591751098632812, 91.39874267578125 ], "type": "float32" } }, { "name": "sub float32 broadcast 4D to 4D", "inputs": { "a": { "shape": [1, 1, 1, 1], "data": [ -97.04911633292723 ], "type": "float32" }, "b": { "shape": [2, 2, 2, 3], "data": [ 73.59273411765761, 14.484682970108636, -69.40201711151408, -52.04528488626416, -75.78136877111933, -2.274051445061204, -83.29907743841476, 15.57776886289956, -62.70080421291606, 32.95400351079056, 82.55709225645836, -74.90638758877455, 78.22299428029646, 48.39240254947623, -19.153541450651716, -85.93221227232242, 89.12354776921964, 22.874629248059804, 80.56973297595874, 97.62598337281631, 52.74850952689357, 89.16604046945432, -20.503417738603375, 99.48707602133317 ], "type": "float32" } }, "expected": { "name": "output", "shape": [2, 2, 2, 3], "data": [ -170.641845703125, -111.53379821777344, -27.64710235595703, -45.00383377075195, -21.267745971679688, -94.77507019042969, -13.750038146972656, -112.62688446044922, -34.34831237792969, -130.00311279296875, -179.606201171875, -22.142730712890625, -175.27210998535156, -145.4415283203125, -77.89557647705078, -11.116905212402344, -186.17266845703125, -119.92375183105469, -177.6188507080078, -194.67510986328125, -149.79762268066406, -186.21514892578125, -76.54570007324219, -196.53619384765625 ], "type": "float32" } } ] }