From 861cb02b2d106efc69f0f2973ceed6838de55240 Mon Sep 17 00:00:00 2001 From: Olivier Wulveryck Date: Wed, 22 May 2019 11:11:24 +0200 Subject: [PATCH 1/7] chore: new coverage generation --- backend/x/gorgonnx/ONNX_COVERAGE.md | 566 ++++++++++++++-------------- 1 file changed, 283 insertions(+), 283 deletions(-) diff --git a/backend/x/gorgonnx/ONNX_COVERAGE.md b/backend/x/gorgonnx/ONNX_COVERAGE.md index f96ed2f8..1614b223 100644 --- a/backend/x/gorgonnx/ONNX_COVERAGE.md +++ b/backend/x/gorgonnx/ONNX_COVERAGE.md @@ -1,327 +1,327 @@ -Covering 20.8% of the onnx integration tests +Covering 21.1% of the onnx integration tests |.| OpType | Test | Tested | Skipped | Failed | |-|-------------|----------------------|--------|---------|--------| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Neg|TestNegExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Div|TestDivBcast|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sub|TestSubBcast|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeReducedDims|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxAxis0|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sin|TestSin|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sqrt|TestSqrtExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Ceil|TestCeil|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat3dAxis1|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestConvWithStridesPadding|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestConvWithStridesNoPadding|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Mul|TestMulExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Tanh|TestTanhExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dDefault|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Abs|TestAbs|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Add|TestAdd|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxLargeNumber|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sub|TestSubExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeReorderedDims|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Mul|TestMul|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sign|TestSign|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Div|TestDiv|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxDefaultAxis|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dCeil|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat3dAxis1|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeExtendedDims|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softplus|TestSoftplus|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat2dAxis1|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Exp|TestExp|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Relu|TestRelu|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sqrt|TestSqrtExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MatMul|TestMatmul2d|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Ceil|TestCeilExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Dropout|TestDropoutDefault|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dPads|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sin|TestSinExample|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dPrecomputedStrides|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Gemm|TestGemmNobroadcast|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Floor|TestFloor|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dStrides|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeExtendedDims|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxLargeNumber|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Div|TestDivBcast|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dCeil|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat1dAxis0|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat3dAxis0|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Add|TestAddBcast|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Mul|TestMulExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeNegativeDim|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sub|TestSub|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Div|TestDiv|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat2dAxis0|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxAxis2|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Floor|TestFloorExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Cos|TestCosExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxAxis1|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Ceil|TestCeil|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Tanh|TestTanh|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sin|TestSin|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dDefault|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxAxis0|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Tanh|TestTanhExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Dropout|TestDropoutDefault|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Log|TestLogExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dStrides|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Exp|TestExpExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Dropout|TestDropoutRandom|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Mul|TestMul|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Div|TestDivExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat3dAxis2|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Mul|TestMulBcast|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Gemm|TestGemmBroadcast|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Cos|TestCos|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sigmoid|TestSigmoidExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Floor|TestFloor|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Dropout|TestDropoutRandom|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Neg|TestNegExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Tanh|TestTanh|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeReducedDims|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestBasicConvWithoutPadding|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxAxis2|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeReorderedDims|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sub|TestSubExample|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sigmoid|TestSigmoid|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Log|TestLog|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Neg|TestNeg|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestConvWithStridesNoPadding|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Gemm|TestGemmBroadcast|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxExample|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softplus|TestSoftplusExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dPrecomputedPads|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat2dAxis1|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sin|TestSinExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softplus|TestSoftplus|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sub|TestSub|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeNegativeDim|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestBasicConvWithoutPadding|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestBasicConvWithPadding|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat3dAxis0|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sqrt|TestSqrt|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Log|TestLogExample|true|false|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acosh|TestAcoshExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfBatchOnlybigramsSkip0|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|PRelu|TestPreluBroadcast|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedPads|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool3dDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ThresholdedRelu|TestThresholdedrelu|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Max|TestMaxExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|HardSigmoid|TestHardsigmoidDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LeakyRelu|TestLeakyrelu|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxDefaultAxisExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1KeepDimsExample|true|true|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MatMul|TestMatmul2d|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sub|TestSubBcast|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Neg|TestNeg|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Gemm|TestGemmNobroadcast|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Add|TestAddBcast|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat3dAxis2|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Abs|TestAbs|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Ceil|TestCeilExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sigmoid|TestSigmoidExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Identity|TestIdentity|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Log|TestLog|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxAxis1|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dPads|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Cos|TestCosExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Mul|TestMulBcast|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Cos|TestCos|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Add|TestAdd|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dPrecomputedPads|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Floor|TestFloorExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Relu|TestRelu|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sign|TestSign|true|false|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Gather|TestGather0|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeDownsampleNearest|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalAveragePool|TestGlobalaveragepool|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminNoKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations4|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sinh|TestSinh|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LRN|TestLrnDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxExample1|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acos|TestAcos|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxAxis2|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sum|TestSumOneInput|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cosh|TestCosh|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations3|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shrink|TestShrinkSoft|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Upsample|TestUpsampleNearest|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxAxis0|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDoNotKeepdimsExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxLargeNumber|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSumDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Scatter|TestScatterWithAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis3|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mean|TestMeanTwoInputs|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfBatchOnlybigramsSkip5|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxNoKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ThresholdedRelu|TestThresholdedreluDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|HardSigmoid|TestHardsigmoidDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitVariablePartsDefaultAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitEqualParts1d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dSameLower|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPowBcastArray|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations5|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxUnpool|TestMaxunpoolExportWithOutputShape|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mean|TestMeanOneInput|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Elu|TestEluExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipDefaultMax|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitVariableParts1d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposePads|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpoolWithArgmax2dPrecomputedPads|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis0|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shrink|TestShrinkHard|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxExample1|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mean|TestMeanTwoInputs|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|DepthToSpace|TestDepthtospace|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxNoKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Max|TestMaxTwoInputs|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtranspose3d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Upsample|TestUpsampleNearest|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Softsign|TestSoftsignExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipOutbounds|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations1|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1KeepDimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Min|TestMinOneInput|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Scatter|TestScatterWithoutAxis|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dCeil|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxAxis0|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPowExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LRN|TestLrnDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Conv|TestConvWithStridesAndAsymmetricPadding|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sum|TestSumTwoInputs|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfOnlyBigramsSkip0|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtranspose1d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpKeepdimsRandom|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminDefaultAxisExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dDilations|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSlice|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MeanVarianceNormalization|TestMvn|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalMaxPool|TestGlobalmaxpoolPrecomputed|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxUnpool|TestMaxunpoolExportWithoutOutputShape|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminDefaultAxisRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Expand|TestExpandDimChanged|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shrink|TestShrinkHard|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceNegSteps|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Selu|TestSeluExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atanh|TestAtanhExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenDefaultAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|EyeLike|TestEyelikeWithoutDtype|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Max|TestMaxOneInput|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asinh|TestAsinhExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mean|TestMeanOneInput|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1KeepDimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shape|TestShapeExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asin|TestAsinExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPads|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipSplitbounds|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxNoKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeOutputShape|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDoNotKeepdimsRandom|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ThresholdedRelu|TestThresholdedreluExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeWithKernel|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asin|TestAsinExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2KeepDimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pad|TestReflectPad|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Selu|TestSelu|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atanh|TestAtanh|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|InstanceNormalization|TestInstancenormEpsilon|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPowBcastArray|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitVariableParts2d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitEqualPartsDefaultAxis|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxKeepdimsRandom|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pad|TestConstantPad|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeDilations|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sinh|TestSinhExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|BatchNormalization|TestBatchnormEpsilon|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Reciprocal|TestReciprocal|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ThresholdedRelu|TestThresholdedrelu|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MatMul|TestMatmul3d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atan|TestAtan|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipDefaultInbounds|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acosh|TestAcosh|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acos|TestAcosExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MatMul|TestMatmul4d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalAveragePool|TestGlobalaveragepool|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|EyeLike|TestEyelikeWithDtype|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tile|TestTile|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxOneHot|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dSameLower|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPadsCountIncludePad|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxDefaultAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Selu|TestSeluDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSumAscAxes|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeOutputShape|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitVariableParts1d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Min|TestMinExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tan|TestTanExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dPrecomputedSameUpper|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shape|TestShapeExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shape|TestShape|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxDefaultAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dStrides|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipInbounds|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Min|TestMinExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpoolWithArgmax2dPrecomputedStrides|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfBatchOnlybigramsSkip5|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atan|TestAtanExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MatMul|TestMatmul3d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Selu|TestSeluDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxAxis2|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfBatchUniandbigramsSkip5|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cast|TestCastDOUBLEToFLOAT|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations3|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminNoKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Constant|TestConstant|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtranspose|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Expand|TestExpandDimChanged|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalMaxPool|TestGlobalmaxpool|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitEqualParts1d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atanh|TestAtanhExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dStrides|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|BatchNormalization|TestBatchnormEpsilon|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asin|TestAsin|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeDownsampleNearest|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSum|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tile|TestTilePrecomputed|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations2|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LRN|TestLrn|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mean|TestMeanExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis1|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalAveragePool|TestGlobalaveragepoolPrecomputed|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Gather|TestGather1|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClip|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Scan|TestScan9Sum|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeUpsampleNearest|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSumDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtranspose1d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dSameUpper|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|PRelu|TestPreluBroadcast|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atan|TestAtanExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfOnlyBigramsSkip0|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfOnlybigramsLevelempty|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dSameLower|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeUpsampleLinear|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxAxis1|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Reciprocal|TestReciprocal|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfOnlybigramsSkip5|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dSameUpper|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedStrides|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pad|TestEdgePad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedPadsCountIncludePad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LeakyRelu|TestLeakyrelu|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtranspose|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MeanVarianceNormalization|TestMvn|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2KeepDimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxAxis1|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposePad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPadsCountIncludePad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|HardSigmoid|TestHardsigmoid|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Elu|TestEluDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Unsqueeze|TestUnsqueeze|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acos|TestAcos|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LeakyRelu|TestLeakyreluDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeNearest|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxDefaultAxisRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeUpsampleLinear|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Scatter|TestScatterWithoutAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfBatchOnlybigramsSkip0|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDefaultAxesKeepdimExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dSameUpper|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|InstanceNormalization|TestInstancenormExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSlice|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceDefaultAxes|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|DepthToSpace|TestDepthtospace|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalMaxPool|TestGlobalmaxpoolPrecomputed|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedStrides|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool3dDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Softsign|TestSoftsign|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cast|TestCastFLOATToDOUBLE|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sinh|TestSinh|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|EyeLike|TestEyelikeWithDtype|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeDownsampleLinear|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tile|TestTilePrecomputed|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Min|TestMinTwoInputs|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis3|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ThresholdedRelu|TestThresholdedreluDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPow|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations0|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool1dDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Max|TestMaxTwoInputs|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Unsqueeze|TestUnsqueeze|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|InstanceNormalization|TestInstancenormEpsilon|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis2|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSumAscAxes|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2KeepDimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cosh|TestCosh|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|PRelu|TestPreluExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipDefaultInbounds|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asinh|TestAsinhExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceDefaultSteps|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinKeepdimsExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedSameUpper|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Elu|TestElu|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|InstanceNormalization|TestInstancenormExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitEqualParts2d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposePad|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipDefaultMin|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxAxis0|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cast|TestCastFLOATToDOUBLE|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConstantOfShape|TestConstantofshapeFloatOnes|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cosh|TestCoshExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sum|TestSumOneInput|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations5|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atan|TestAtan|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LeakyRelu|TestLeakyreluExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acos|TestAcosExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shrink|TestShrinkSoft|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shape|TestShape|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|EyeLike|TestEyelikeWithoutDtype|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations4|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClip|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Elu|TestEluDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPowExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|BatchNormalization|TestBatchnormExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxAxis1|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeWithKernel|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acosh|TestAcosh|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeDownsampleLinear|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceDefaultAxes|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitVariablePartsDefaultAxis|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Squeeze|TestSqueeze|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asin|TestAsin|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeKernelShape|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Softsign|TestSoftsign|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Scan|TestScan9Sum|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cast|TestCastDOUBLEToFLOAT|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSumDescAxes|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxDefaultAxis|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConstantOfShape|TestConstantofshapeIntZeros|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxAxis2|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Expand|TestExpandDimUnchanged|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tan|TestTan|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LRN|TestLrn|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalAveragePool|TestGlobalaveragepoolPrecomputed|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxOneHot|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mean|TestMeanExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Reciprocal|TestReciprocalExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|DepthToSpace|TestDepthtospaceExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtranspose3d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2KeepDimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDoNotKeepdimsExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tan|TestTanExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|BatchNormalization|TestBatchnormExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeKernelShape|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Selu|TestSeluExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis2|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool1dDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfUniandbigramsSkip5|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|HardSigmoid|TestHardsigmoidExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Erf|TestErf|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Identity|TestIdentity|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool1dDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDefaultAxesKeepdimExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceNegSteps|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposePads|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfOnlybigramsLevelempty|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atanh|TestAtanh|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipDefaultMax|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminNoKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dDilations|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipSplitbounds|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Squeeze|TestSqueeze|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acosh|TestAcoshExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool3dDefault|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sum|TestSumExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfUniandbigramsSkip5|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Reciprocal|TestReciprocalExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Expand|TestExpandDimUnchanged|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceDefaultSteps|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|DepthToSpace|TestDepthtospaceExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Gather|TestGather0|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedPadsCountIncludePad|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxAxis1|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dSameUpper|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asinh|TestAsinh|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Max|TestMaxExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Gather|TestGather1|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations0|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitEqualParts2d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sum|TestSumTwoInputs|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|EyeLike|TestEyelikePopulateOffMainDiagonal|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeDilations|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tile|TestTile|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPow|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dCeil|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LeakyRelu|TestLeakyreluDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxAxis0|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitVariableParts2d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxAxis2|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pad|TestReflectPad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Min|TestMinOneInput|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxDefaultAxisExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminDefaultAxisRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sinh|TestSinhExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis1|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Elu|TestElu|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConstantOfShape|TestConstantofshapeFloatOnes|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Conv|TestConvWithStridesAndAsymmetricPadding|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSum|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Scatter|TestScatterWithAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1KeepDimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool1dDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpoolWithArgmax2dPrecomputedStrides|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConstantOfShape|TestConstantofshapeIntZeros|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeUpsampleNearest|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Constant|TestConstant|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitEqualPartsDefaultAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pad|TestEdgePad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations1|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxUnpool|TestMaxunpoolExportWithoutOutputShape|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool3dDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Elu|TestEluExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LeakyRelu|TestLeakyreluExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Erf|TestErf|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxNoKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedPads|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxDefaultAxisRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations2|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Selu|TestSelu|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalMaxPool|TestGlobalmaxpool|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asinh|TestAsinh|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cosh|TestCoshExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfBatchUniandbigramsSkip5|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxDefaultAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|PRelu|TestPreluExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeNearest|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipOutbounds|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxUnpool|TestMaxunpoolExportWithOutputShape|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Softsign|TestSoftsignExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipDefaultMin|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis0|true|true|false| From 41a57fe08529b144b73a63b86859692eab12ae9d Mon Sep 17 00:00:00 2001 From: Olivier Wulveryck Date: Wed, 22 May 2019 11:11:47 +0200 Subject: [PATCH 2/7] fix: remove old files because tests were registered twice --- .../onnx/onnx_register_testcases.go | 331 ------------------ 1 file changed, 331 deletions(-) delete mode 100644 backend/testbackend/onnx/onnx_register_testcases.go diff --git a/backend/testbackend/onnx/onnx_register_testcases.go b/backend/testbackend/onnx/onnx_register_testcases.go deleted file mode 100644 index 6fd2cdba..00000000 --- a/backend/testbackend/onnx/onnx_register_testcases.go +++ /dev/null @@ -1,331 +0,0 @@ -package onnxtest - -import "github.com/owulveryck/onnx-go/backend/testbackend" - -func init() { - // Register all the test cases - - testbackend.Register("Abs", "TestAbs", NewTestAbs) - testbackend.Register("Acos", "TestAcos", NewTestAcos) - testbackend.Register("Acos", "TestAcosExample", NewTestAcosExample) - testbackend.Register("Acosh", "TestAcosh", NewTestAcosh) - testbackend.Register("Acosh", "TestAcoshExample", NewTestAcoshExample) - testbackend.Register("Add", "TestAdd", NewTestAdd) - testbackend.Register("Add", "TestAddBcast", NewTestAddBcast) - testbackend.Register("ArgMax", "TestArgmaxDefaultAxisExample", NewTestArgmaxDefaultAxisExample) - testbackend.Register("ArgMax", "TestArgmaxDefaultAxisRandom", NewTestArgmaxDefaultAxisRandom) - testbackend.Register("ArgMax", "TestArgmaxKeepdimsExample", NewTestArgmaxKeepdimsExample) - testbackend.Register("ArgMax", "TestArgmaxKeepdimsRandom", NewTestArgmaxKeepdimsRandom) - testbackend.Register("ArgMax", "TestArgmaxNoKeepdimsExample", NewTestArgmaxNoKeepdimsExample) - testbackend.Register("ArgMax", "TestArgmaxNoKeepdimsRandom", NewTestArgmaxNoKeepdimsRandom) - testbackend.Register("ArgMin", "TestArgminDefaultAxisExample", NewTestArgminDefaultAxisExample) - testbackend.Register("ArgMin", "TestArgminDefaultAxisRandom", NewTestArgminDefaultAxisRandom) - testbackend.Register("ArgMin", "TestArgminKeepdimsExample", NewTestArgminKeepdimsExample) - testbackend.Register("ArgMin", "TestArgminKeepdimsRandom", NewTestArgminKeepdimsRandom) - testbackend.Register("ArgMin", "TestArgminNoKeepdimsExample", NewTestArgminNoKeepdimsExample) - testbackend.Register("ArgMin", "TestArgminNoKeepdimsRandom", NewTestArgminNoKeepdimsRandom) - testbackend.Register("Asin", "TestAsin", NewTestAsin) - testbackend.Register("Asin", "TestAsinExample", NewTestAsinExample) - testbackend.Register("Asinh", "TestAsinh", NewTestAsinh) - testbackend.Register("Asinh", "TestAsinhExample", NewTestAsinhExample) - testbackend.Register("Atan", "TestAtan", NewTestAtan) - testbackend.Register("Atan", "TestAtanExample", NewTestAtanExample) - testbackend.Register("Atanh", "TestAtanh", NewTestAtanh) - testbackend.Register("Atanh", "TestAtanhExample", NewTestAtanhExample) - testbackend.Register("AveragePool", "TestAveragepool1dDefault", NewTestAveragepool1dDefault) - testbackend.Register("AveragePool", "TestAveragepool2dCeil", NewTestAveragepool2dCeil) - testbackend.Register("AveragePool", "TestAveragepool2dDefault", NewTestAveragepool2dDefault) - testbackend.Register("AveragePool", "TestAveragepool2dPads", NewTestAveragepool2dPads) - testbackend.Register("AveragePool", "TestAveragepool2dPadsCountIncludePad", NewTestAveragepool2dPadsCountIncludePad) - testbackend.Register("AveragePool", "TestAveragepool2dPrecomputedPads", NewTestAveragepool2dPrecomputedPads) - testbackend.Register("AveragePool", "TestAveragepool2dPrecomputedPadsCountIncludePad", NewTestAveragepool2dPrecomputedPadsCountIncludePad) - testbackend.Register("AveragePool", "TestAveragepool2dPrecomputedSameUpper", NewTestAveragepool2dPrecomputedSameUpper) - testbackend.Register("AveragePool", "TestAveragepool2dPrecomputedStrides", NewTestAveragepool2dPrecomputedStrides) - testbackend.Register("AveragePool", "TestAveragepool2dSameLower", NewTestAveragepool2dSameLower) - testbackend.Register("AveragePool", "TestAveragepool2dSameUpper", NewTestAveragepool2dSameUpper) - testbackend.Register("AveragePool", "TestAveragepool2dStrides", NewTestAveragepool2dStrides) - testbackend.Register("AveragePool", "TestAveragepool3dDefault", NewTestAveragepool3dDefault) - testbackend.Register("Conv", "TestBasicConvWithPadding", NewTestBasicConvWithPadding) - testbackend.Register("Conv", "TestBasicConvWithoutPadding", NewTestBasicConvWithoutPadding) - testbackend.Register("BatchNormalization", "TestBatchnormEpsilon", NewTestBatchnormEpsilon) - testbackend.Register("BatchNormalization", "TestBatchnormExample", NewTestBatchnormExample) - testbackend.Register("Cast", "TestCastDOUBLEToFLOAT", NewTestCastDOUBLEToFLOAT) - testbackend.Register("Cast", "TestCastFLOATToDOUBLE", NewTestCastFLOATToDOUBLE) - testbackend.Register("Ceil", "TestCeil", NewTestCeil) - testbackend.Register("Ceil", "TestCeilExample", NewTestCeilExample) - testbackend.Register("Clip", "TestClip", NewTestClip) - testbackend.Register("Clip", "TestClipDefaultInbounds", NewTestClipDefaultInbounds) - testbackend.Register("Clip", "TestClipDefaultMax", NewTestClipDefaultMax) - testbackend.Register("Clip", "TestClipDefaultMin", NewTestClipDefaultMin) - testbackend.Register("Clip", "TestClipExample", NewTestClipExample) - testbackend.Register("Clip", "TestClipInbounds", NewTestClipInbounds) - testbackend.Register("Clip", "TestClipOutbounds", NewTestClipOutbounds) - testbackend.Register("Clip", "TestClipSplitbounds", NewTestClipSplitbounds) - testbackend.Register("Concat", "TestConcat1dAxis0", NewTestConcat1dAxis0) - testbackend.Register("Concat", "TestConcat2dAxis0", NewTestConcat2dAxis0) - testbackend.Register("Concat", "TestConcat2dAxis1", NewTestConcat2dAxis1) - testbackend.Register("Concat", "TestConcat3dAxis0", NewTestConcat3dAxis0) - testbackend.Register("Concat", "TestConcat3dAxis1", NewTestConcat3dAxis1) - testbackend.Register("Concat", "TestConcat3dAxis2", NewTestConcat3dAxis2) - testbackend.Register("Constant", "TestConstant", NewTestConstant) - testbackend.Register("Pad", "TestConstantPad", NewTestConstantPad) - testbackend.Register("ConstantOfShape", "TestConstantofshapeFloatOnes", NewTestConstantofshapeFloatOnes) - testbackend.Register("ConstantOfShape", "TestConstantofshapeIntZeros", NewTestConstantofshapeIntZeros) - testbackend.Register("Conv", "TestConvWithStridesAndAsymmetricPadding", NewTestConvWithStridesAndAsymmetricPadding) - testbackend.Register("Conv", "TestConvWithStridesNoPadding", NewTestConvWithStridesNoPadding) - testbackend.Register("Conv", "TestConvWithStridesPadding", NewTestConvWithStridesPadding) - testbackend.Register("ConvTranspose", "TestConvtranspose", NewTestConvtranspose) - testbackend.Register("ConvTranspose", "TestConvtranspose1d", NewTestConvtranspose1d) - testbackend.Register("ConvTranspose", "TestConvtranspose3d", NewTestConvtranspose3d) - testbackend.Register("ConvTranspose", "TestConvtransposeDilations", NewTestConvtransposeDilations) - testbackend.Register("ConvTranspose", "TestConvtransposeKernelShape", NewTestConvtransposeKernelShape) - testbackend.Register("ConvTranspose", "TestConvtransposeOutputShape", NewTestConvtransposeOutputShape) - testbackend.Register("ConvTranspose", "TestConvtransposePad", NewTestConvtransposePad) - testbackend.Register("ConvTranspose", "TestConvtransposePads", NewTestConvtransposePads) - testbackend.Register("ConvTranspose", "TestConvtransposeWithKernel", NewTestConvtransposeWithKernel) - testbackend.Register("Cos", "TestCos", NewTestCos) - testbackend.Register("Cos", "TestCosExample", NewTestCosExample) - testbackend.Register("Cosh", "TestCosh", NewTestCosh) - testbackend.Register("Cosh", "TestCoshExample", NewTestCoshExample) - testbackend.Register("DepthToSpace", "TestDepthtospace", NewTestDepthtospace) - testbackend.Register("DepthToSpace", "TestDepthtospaceExample", NewTestDepthtospaceExample) - testbackend.Register("Div", "TestDiv", NewTestDiv) - testbackend.Register("Div", "TestDivBcast", NewTestDivBcast) - testbackend.Register("Div", "TestDivExample", NewTestDivExample) - testbackend.Register("Dropout", "TestDropoutDefault", NewTestDropoutDefault) - testbackend.Register("Dropout", "TestDropoutRandom", NewTestDropoutRandom) - testbackend.Register("Pad", "TestEdgePad", NewTestEdgePad) - testbackend.Register("Elu", "TestElu", NewTestElu) - testbackend.Register("Elu", "TestEluDefault", NewTestEluDefault) - testbackend.Register("Elu", "TestEluExample", NewTestEluExample) - testbackend.Register("Erf", "TestErf", NewTestErf) - testbackend.Register("Exp", "TestExp", NewTestExp) - testbackend.Register("Exp", "TestExpExample", NewTestExpExample) - testbackend.Register("Expand", "TestExpandDimChanged", NewTestExpandDimChanged) - testbackend.Register("Expand", "TestExpandDimUnchanged", NewTestExpandDimUnchanged) - testbackend.Register("EyeLike", "TestEyelikePopulateOffMainDiagonal", NewTestEyelikePopulateOffMainDiagonal) - testbackend.Register("EyeLike", "TestEyelikeWithDtype", NewTestEyelikeWithDtype) - testbackend.Register("EyeLike", "TestEyelikeWithoutDtype", NewTestEyelikeWithoutDtype) - testbackend.Register("Flatten", "TestFlattenAxis0", NewTestFlattenAxis0) - testbackend.Register("Flatten", "TestFlattenAxis1", NewTestFlattenAxis1) - testbackend.Register("Flatten", "TestFlattenAxis2", NewTestFlattenAxis2) - testbackend.Register("Flatten", "TestFlattenAxis3", NewTestFlattenAxis3) - testbackend.Register("Flatten", "TestFlattenDefaultAxis", NewTestFlattenDefaultAxis) - testbackend.Register("Floor", "TestFloor", NewTestFloor) - testbackend.Register("Floor", "TestFloorExample", NewTestFloorExample) - testbackend.Register("Gather", "TestGather0", NewTestGather0) - testbackend.Register("Gather", "TestGather1", NewTestGather1) - testbackend.Register("Gemm", "TestGemmBroadcast", NewTestGemmBroadcast) - testbackend.Register("Gemm", "TestGemmNobroadcast", NewTestGemmNobroadcast) - testbackend.Register("GlobalAveragePool", "TestGlobalaveragepool", NewTestGlobalaveragepool) - testbackend.Register("GlobalAveragePool", "TestGlobalaveragepoolPrecomputed", NewTestGlobalaveragepoolPrecomputed) - testbackend.Register("GlobalMaxPool", "TestGlobalmaxpool", NewTestGlobalmaxpool) - testbackend.Register("GlobalMaxPool", "TestGlobalmaxpoolPrecomputed", NewTestGlobalmaxpoolPrecomputed) - testbackend.Register("Hardmax", "TestHardmaxAxis0", NewTestHardmaxAxis0) - testbackend.Register("Hardmax", "TestHardmaxAxis1", NewTestHardmaxAxis1) - testbackend.Register("Hardmax", "TestHardmaxAxis2", NewTestHardmaxAxis2) - testbackend.Register("Hardmax", "TestHardmaxDefaultAxis", NewTestHardmaxDefaultAxis) - testbackend.Register("Hardmax", "TestHardmaxExample", NewTestHardmaxExample) - testbackend.Register("Hardmax", "TestHardmaxOneHot", NewTestHardmaxOneHot) - testbackend.Register("HardSigmoid", "TestHardsigmoid", NewTestHardsigmoid) - testbackend.Register("HardSigmoid", "TestHardsigmoidDefault", NewTestHardsigmoidDefault) - testbackend.Register("HardSigmoid", "TestHardsigmoidExample", NewTestHardsigmoidExample) - testbackend.Register("Identity", "TestIdentity", NewTestIdentity) - testbackend.Register("InstanceNormalization", "TestInstancenormEpsilon", NewTestInstancenormEpsilon) - testbackend.Register("InstanceNormalization", "TestInstancenormExample", NewTestInstancenormExample) - testbackend.Register("LeakyRelu", "TestLeakyrelu", NewTestLeakyrelu) - testbackend.Register("LeakyRelu", "TestLeakyreluDefault", NewTestLeakyreluDefault) - testbackend.Register("LeakyRelu", "TestLeakyreluExample", NewTestLeakyreluExample) - testbackend.Register("Log", "TestLog", NewTestLog) - testbackend.Register("Log", "TestLogExample", NewTestLogExample) - testbackend.Register("LogSoftmax", "TestLogsoftmaxAxis0", NewTestLogsoftmaxAxis0) - testbackend.Register("LogSoftmax", "TestLogsoftmaxAxis1", NewTestLogsoftmaxAxis1) - testbackend.Register("LogSoftmax", "TestLogsoftmaxAxis2", NewTestLogsoftmaxAxis2) - testbackend.Register("LogSoftmax", "TestLogsoftmaxDefaultAxis", NewTestLogsoftmaxDefaultAxis) - testbackend.Register("LogSoftmax", "TestLogsoftmaxExample1", NewTestLogsoftmaxExample1) - testbackend.Register("LogSoftmax", "TestLogsoftmaxLargeNumber", NewTestLogsoftmaxLargeNumber) - testbackend.Register("LRN", "TestLrn", NewTestLrn) - testbackend.Register("LRN", "TestLrnDefault", NewTestLrnDefault) - testbackend.Register("MatMul", "TestMatmul2d", NewTestMatmul2d) - testbackend.Register("MatMul", "TestMatmul3d", NewTestMatmul3d) - testbackend.Register("MatMul", "TestMatmul4d", NewTestMatmul4d) - testbackend.Register("Max", "TestMaxExample", NewTestMaxExample) - testbackend.Register("Max", "TestMaxOneInput", NewTestMaxOneInput) - testbackend.Register("Max", "TestMaxTwoInputs", NewTestMaxTwoInputs) - testbackend.Register("MaxPool", "TestMaxpool1dDefault", NewTestMaxpool1dDefault) - testbackend.Register("MaxPool", "TestMaxpool2dCeil", NewTestMaxpool2dCeil) - testbackend.Register("MaxPool", "TestMaxpool2dDefault", NewTestMaxpool2dDefault) - testbackend.Register("MaxPool", "TestMaxpool2dDilations", NewTestMaxpool2dDilations) - testbackend.Register("MaxPool", "TestMaxpool2dPads", NewTestMaxpool2dPads) - testbackend.Register("MaxPool", "TestMaxpool2dPrecomputedPads", NewTestMaxpool2dPrecomputedPads) - testbackend.Register("MaxPool", "TestMaxpool2dPrecomputedSameUpper", NewTestMaxpool2dPrecomputedSameUpper) - testbackend.Register("MaxPool", "TestMaxpool2dPrecomputedStrides", NewTestMaxpool2dPrecomputedStrides) - testbackend.Register("MaxPool", "TestMaxpool2dSameLower", NewTestMaxpool2dSameLower) - testbackend.Register("MaxPool", "TestMaxpool2dSameUpper", NewTestMaxpool2dSameUpper) - testbackend.Register("MaxPool", "TestMaxpool2dStrides", NewTestMaxpool2dStrides) - testbackend.Register("MaxPool", "TestMaxpool3dDefault", NewTestMaxpool3dDefault) - testbackend.Register("MaxPool", "TestMaxpoolWithArgmax2dPrecomputedPads", NewTestMaxpoolWithArgmax2dPrecomputedPads) - testbackend.Register("MaxPool", "TestMaxpoolWithArgmax2dPrecomputedStrides", NewTestMaxpoolWithArgmax2dPrecomputedStrides) - testbackend.Register("MaxUnpool", "TestMaxunpoolExportWithOutputShape", NewTestMaxunpoolExportWithOutputShape) - testbackend.Register("MaxUnpool", "TestMaxunpoolExportWithoutOutputShape", NewTestMaxunpoolExportWithoutOutputShape) - testbackend.Register("Mean", "TestMeanExample", NewTestMeanExample) - testbackend.Register("Mean", "TestMeanOneInput", NewTestMeanOneInput) - testbackend.Register("Mean", "TestMeanTwoInputs", NewTestMeanTwoInputs) - testbackend.Register("Min", "TestMinExample", NewTestMinExample) - testbackend.Register("Min", "TestMinOneInput", NewTestMinOneInput) - testbackend.Register("Min", "TestMinTwoInputs", NewTestMinTwoInputs) - testbackend.Register("Mul", "TestMul", NewTestMul) - testbackend.Register("Mul", "TestMulBcast", NewTestMulBcast) - testbackend.Register("Mul", "TestMulExample", NewTestMulExample) - testbackend.Register("MeanVarianceNormalization", "TestMvn", NewTestMvn) - testbackend.Register("Neg", "TestNeg", NewTestNeg) - testbackend.Register("Neg", "TestNegExample", NewTestNegExample) - testbackend.Register("Pow", "TestPow", NewTestPow) - testbackend.Register("Pow", "TestPowBcastArray", NewTestPowBcastArray) - testbackend.Register("Pow", "TestPowExample", NewTestPowExample) - testbackend.Register("PRelu", "TestPreluBroadcast", NewTestPreluBroadcast) - testbackend.Register("PRelu", "TestPreluExample", NewTestPreluExample) - testbackend.Register("Reciprocal", "TestReciprocal", NewTestReciprocal) - testbackend.Register("Reciprocal", "TestReciprocalExample", NewTestReciprocalExample) - testbackend.Register("ReduceL1", "TestReduceL1DefaultAxesKeepdimsExample", NewTestReduceL1DefaultAxesKeepdimsExample) - testbackend.Register("ReduceL1", "TestReduceL1DefaultAxesKeepdimsRandom", NewTestReduceL1DefaultAxesKeepdimsRandom) - testbackend.Register("ReduceL1", "TestReduceL1DoNotKeepdimsExample", NewTestReduceL1DoNotKeepdimsExample) - testbackend.Register("ReduceL1", "TestReduceL1DoNotKeepdimsRandom", NewTestReduceL1DoNotKeepdimsRandom) - testbackend.Register("ReduceL1", "TestReduceL1KeepDimsExample", NewTestReduceL1KeepDimsExample) - testbackend.Register("ReduceL1", "TestReduceL1KeepDimsRandom", NewTestReduceL1KeepDimsRandom) - testbackend.Register("ReduceL2", "TestReduceL2DefaultAxesKeepdimsExample", NewTestReduceL2DefaultAxesKeepdimsExample) - testbackend.Register("ReduceL2", "TestReduceL2DefaultAxesKeepdimsRandom", NewTestReduceL2DefaultAxesKeepdimsRandom) - testbackend.Register("ReduceL2", "TestReduceL2DoNotKeepdimsExample", NewTestReduceL2DoNotKeepdimsExample) - testbackend.Register("ReduceL2", "TestReduceL2DoNotKeepdimsRandom", NewTestReduceL2DoNotKeepdimsRandom) - testbackend.Register("ReduceL2", "TestReduceL2KeepDimsExample", NewTestReduceL2KeepDimsExample) - testbackend.Register("ReduceL2", "TestReduceL2KeepDimsRandom", NewTestReduceL2KeepDimsRandom) - testbackend.Register("ReduceLogSum", "TestReduceLogSum", NewTestReduceLogSum) - testbackend.Register("ReduceLogSum", "TestReduceLogSumAscAxes", NewTestReduceLogSumAscAxes) - testbackend.Register("ReduceLogSum", "TestReduceLogSumDefault", NewTestReduceLogSumDefault) - testbackend.Register("ReduceLogSum", "TestReduceLogSumDescAxes", NewTestReduceLogSumDescAxes) - testbackend.Register("ReduceLogSumExp", "TestReduceLogSumExpDefaultAxesKeepdimsExample", NewTestReduceLogSumExpDefaultAxesKeepdimsExample) - testbackend.Register("ReduceLogSumExp", "TestReduceLogSumExpDefaultAxesKeepdimsRandom", NewTestReduceLogSumExpDefaultAxesKeepdimsRandom) - testbackend.Register("ReduceLogSumExp", "TestReduceLogSumExpDoNotKeepdimsExample", NewTestReduceLogSumExpDoNotKeepdimsExample) - testbackend.Register("ReduceLogSumExp", "TestReduceLogSumExpDoNotKeepdimsRandom", NewTestReduceLogSumExpDoNotKeepdimsRandom) - testbackend.Register("ReduceLogSumExp", "TestReduceLogSumExpKeepdimsExample", NewTestReduceLogSumExpKeepdimsExample) - testbackend.Register("ReduceLogSumExp", "TestReduceLogSumExpKeepdimsRandom", NewTestReduceLogSumExpKeepdimsRandom) - testbackend.Register("ReduceMax", "TestReduceMaxDefaultAxesKeepdimExample", NewTestReduceMaxDefaultAxesKeepdimExample) - testbackend.Register("ReduceMax", "TestReduceMaxDefaultAxesKeepdimsRandom", NewTestReduceMaxDefaultAxesKeepdimsRandom) - testbackend.Register("ReduceMax", "TestReduceMaxDoNotKeepdimsExample", NewTestReduceMaxDoNotKeepdimsExample) - testbackend.Register("ReduceMax", "TestReduceMaxDoNotKeepdimsRandom", NewTestReduceMaxDoNotKeepdimsRandom) - testbackend.Register("ReduceMax", "TestReduceMaxKeepdimsExample", NewTestReduceMaxKeepdimsExample) - testbackend.Register("ReduceMax", "TestReduceMaxKeepdimsRandom", NewTestReduceMaxKeepdimsRandom) - testbackend.Register("ReduceMean", "TestReduceMeanDefaultAxesKeepdimsExample", NewTestReduceMeanDefaultAxesKeepdimsExample) - testbackend.Register("ReduceMean", "TestReduceMeanDefaultAxesKeepdimsRandom", NewTestReduceMeanDefaultAxesKeepdimsRandom) - testbackend.Register("ReduceMean", "TestReduceMeanDoNotKeepdimsExample", NewTestReduceMeanDoNotKeepdimsExample) - testbackend.Register("ReduceMean", "TestReduceMeanDoNotKeepdimsRandom", NewTestReduceMeanDoNotKeepdimsRandom) - testbackend.Register("ReduceMean", "TestReduceMeanKeepdimsExample", NewTestReduceMeanKeepdimsExample) - testbackend.Register("ReduceMean", "TestReduceMeanKeepdimsRandom", NewTestReduceMeanKeepdimsRandom) - testbackend.Register("ReduceMin", "TestReduceMinDefaultAxesKeepdimsExample", NewTestReduceMinDefaultAxesKeepdimsExample) - testbackend.Register("ReduceMin", "TestReduceMinDefaultAxesKeepdimsRandom", NewTestReduceMinDefaultAxesKeepdimsRandom) - testbackend.Register("ReduceMin", "TestReduceMinDoNotKeepdimsExample", NewTestReduceMinDoNotKeepdimsExample) - testbackend.Register("ReduceMin", "TestReduceMinDoNotKeepdimsRandom", NewTestReduceMinDoNotKeepdimsRandom) - testbackend.Register("ReduceMin", "TestReduceMinKeepdimsExample", NewTestReduceMinKeepdimsExample) - testbackend.Register("ReduceMin", "TestReduceMinKeepdimsRandom", NewTestReduceMinKeepdimsRandom) - testbackend.Register("ReduceProd", "TestReduceProdDefaultAxesKeepdimsExample", NewTestReduceProdDefaultAxesKeepdimsExample) - testbackend.Register("ReduceProd", "TestReduceProdDefaultAxesKeepdimsRandom", NewTestReduceProdDefaultAxesKeepdimsRandom) - testbackend.Register("ReduceProd", "TestReduceProdDoNotKeepdimsExample", NewTestReduceProdDoNotKeepdimsExample) - testbackend.Register("ReduceProd", "TestReduceProdDoNotKeepdimsRandom", NewTestReduceProdDoNotKeepdimsRandom) - testbackend.Register("ReduceProd", "TestReduceProdKeepdimsExample", NewTestReduceProdKeepdimsExample) - testbackend.Register("ReduceProd", "TestReduceProdKeepdimsRandom", NewTestReduceProdKeepdimsRandom) - testbackend.Register("ReduceSum", "TestReduceSumDefaultAxesKeepdimsExample", NewTestReduceSumDefaultAxesKeepdimsExample) - testbackend.Register("ReduceSum", "TestReduceSumDefaultAxesKeepdimsRandom", NewTestReduceSumDefaultAxesKeepdimsRandom) - testbackend.Register("ReduceSum", "TestReduceSumDoNotKeepdimsExample", NewTestReduceSumDoNotKeepdimsExample) - testbackend.Register("ReduceSum", "TestReduceSumDoNotKeepdimsRandom", NewTestReduceSumDoNotKeepdimsRandom) - testbackend.Register("ReduceSum", "TestReduceSumKeepdimsExample", NewTestReduceSumKeepdimsExample) - testbackend.Register("ReduceSum", "TestReduceSumKeepdimsRandom", NewTestReduceSumKeepdimsRandom) - testbackend.Register("ReduceSumSquare", "TestReduceSumSquareDefaultAxesKeepdimsExample", NewTestReduceSumSquareDefaultAxesKeepdimsExample) - testbackend.Register("ReduceSumSquare", "TestReduceSumSquareDefaultAxesKeepdimsRandom", NewTestReduceSumSquareDefaultAxesKeepdimsRandom) - testbackend.Register("ReduceSumSquare", "TestReduceSumSquareDoNotKeepdimsExample", NewTestReduceSumSquareDoNotKeepdimsExample) - testbackend.Register("ReduceSumSquare", "TestReduceSumSquareDoNotKeepdimsRandom", NewTestReduceSumSquareDoNotKeepdimsRandom) - testbackend.Register("ReduceSumSquare", "TestReduceSumSquareKeepdimsExample", NewTestReduceSumSquareKeepdimsExample) - testbackend.Register("ReduceSumSquare", "TestReduceSumSquareKeepdimsRandom", NewTestReduceSumSquareKeepdimsRandom) - testbackend.Register("Pad", "TestReflectPad", NewTestReflectPad) - testbackend.Register("Relu", "TestRelu", NewTestRelu) - testbackend.Register("Reshape", "TestReshapeExtendedDims", NewTestReshapeExtendedDims) - testbackend.Register("Reshape", "TestReshapeNegativeDim", NewTestReshapeNegativeDim) - testbackend.Register("Reshape", "TestReshapeReducedDims", NewTestReshapeReducedDims) - testbackend.Register("Reshape", "TestReshapeReorderedDims", NewTestReshapeReorderedDims) - testbackend.Register("Resize", "TestResizeDownsampleLinear", NewTestResizeDownsampleLinear) - testbackend.Register("Resize", "TestResizeDownsampleNearest", NewTestResizeDownsampleNearest) - testbackend.Register("Resize", "TestResizeNearest", NewTestResizeNearest) - testbackend.Register("Resize", "TestResizeUpsampleLinear", NewTestResizeUpsampleLinear) - testbackend.Register("Resize", "TestResizeUpsampleNearest", NewTestResizeUpsampleNearest) - testbackend.Register("Scan", "TestScan9Sum", NewTestScan9Sum) - testbackend.Register("Scatter", "TestScatterWithAxis", NewTestScatterWithAxis) - testbackend.Register("Scatter", "TestScatterWithoutAxis", NewTestScatterWithoutAxis) - testbackend.Register("Selu", "TestSelu", NewTestSelu) - testbackend.Register("Selu", "TestSeluDefault", NewTestSeluDefault) - testbackend.Register("Selu", "TestSeluExample", NewTestSeluExample) - testbackend.Register("Shape", "TestShape", NewTestShape) - testbackend.Register("Shape", "TestShapeExample", NewTestShapeExample) - testbackend.Register("Shrink", "TestShrinkHard", NewTestShrinkHard) - testbackend.Register("Shrink", "TestShrinkSoft", NewTestShrinkSoft) - testbackend.Register("Sigmoid", "TestSigmoid", NewTestSigmoid) - testbackend.Register("Sigmoid", "TestSigmoidExample", NewTestSigmoidExample) - testbackend.Register("Sign", "TestSign", NewTestSign) - testbackend.Register("Sin", "TestSin", NewTestSin) - testbackend.Register("Sin", "TestSinExample", NewTestSinExample) - testbackend.Register("Sinh", "TestSinh", NewTestSinh) - testbackend.Register("Sinh", "TestSinhExample", NewTestSinhExample) - testbackend.Register("Slice", "TestSlice", NewTestSlice) - testbackend.Register("Slice", "TestSliceDefaultAxes", NewTestSliceDefaultAxes) - testbackend.Register("Slice", "TestSliceDefaultSteps", NewTestSliceDefaultSteps) - testbackend.Register("Slice", "TestSliceNegSteps", NewTestSliceNegSteps) - - testbackend.Register("Softmax", "TestSoftmaxAxis0", NewTestSoftmaxAxis0) - testbackend.Register("Softmax", "TestSoftmaxAxis1", NewTestSoftmaxAxis1) - testbackend.Register("Softmax", "TestSoftmaxAxis2", NewTestSoftmaxAxis2) - testbackend.Register("Softmax", "TestSoftmaxDefaultAxis", NewTestSoftmaxDefaultAxis) - testbackend.Register("Softmax", "TestSoftmaxExample", NewTestSoftmaxExample) - testbackend.Register("Softmax", "TestSoftmaxLargeNumber", NewTestSoftmaxLargeNumber) - testbackend.Register("Softplus", "TestSoftplus", NewTestSoftplus) - testbackend.Register("Softplus", "TestSoftplusExample", NewTestSoftplusExample) - testbackend.Register("Softsign", "TestSoftsign", NewTestSoftsign) - testbackend.Register("Softsign", "TestSoftsignExample", NewTestSoftsignExample) - testbackend.Register("Split", "TestSplitEqualParts1d", NewTestSplitEqualParts1d) - testbackend.Register("Split", "TestSplitEqualParts2d", NewTestSplitEqualParts2d) - testbackend.Register("Split", "TestSplitEqualPartsDefaultAxis", NewTestSplitEqualPartsDefaultAxis) - testbackend.Register("Split", "TestSplitVariableParts1d", NewTestSplitVariableParts1d) - testbackend.Register("Split", "TestSplitVariableParts2d", NewTestSplitVariableParts2d) - testbackend.Register("Split", "TestSplitVariablePartsDefaultAxis", NewTestSplitVariablePartsDefaultAxis) - testbackend.Register("Sqrt", "TestSqrt", NewTestSqrt) - testbackend.Register("Sqrt", "TestSqrtExample", NewTestSqrtExample) - testbackend.Register("Squeeze", "TestSqueeze", NewTestSqueeze) - testbackend.Register("Sub", "TestSub", NewTestSub) - testbackend.Register("Sub", "TestSubBcast", NewTestSubBcast) - testbackend.Register("Sub", "TestSubExample", NewTestSubExample) - testbackend.Register("Sum", "TestSumExample", NewTestSumExample) - testbackend.Register("Sum", "TestSumOneInput", NewTestSumOneInput) - testbackend.Register("Sum", "TestSumTwoInputs", NewTestSumTwoInputs) - testbackend.Register("Tan", "TestTan", NewTestTan) - testbackend.Register("Tan", "TestTanExample", NewTestTanExample) - testbackend.Register("Tanh", "TestTanh", NewTestTanh) - testbackend.Register("Tanh", "TestTanhExample", NewTestTanhExample) - testbackend.Register("TfIdfVectorizer", "TestTfidfvectorizerTfBatchOnlybigramsSkip0", NewTestTfidfvectorizerTfBatchOnlybigramsSkip0) - testbackend.Register("TfIdfVectorizer", "TestTfidfvectorizerTfBatchOnlybigramsSkip5", NewTestTfidfvectorizerTfBatchOnlybigramsSkip5) - testbackend.Register("TfIdfVectorizer", "TestTfidfvectorizerTfBatchUniandbigramsSkip5", NewTestTfidfvectorizerTfBatchUniandbigramsSkip5) - testbackend.Register("TfIdfVectorizer", "TestTfidfvectorizerTfOnlyBigramsSkip0", NewTestTfidfvectorizerTfOnlyBigramsSkip0) - testbackend.Register("TfIdfVectorizer", "TestTfidfvectorizerTfOnlybigramsLevelempty", NewTestTfidfvectorizerTfOnlybigramsLevelempty) - testbackend.Register("TfIdfVectorizer", "TestTfidfvectorizerTfOnlybigramsSkip5", NewTestTfidfvectorizerTfOnlybigramsSkip5) - testbackend.Register("TfIdfVectorizer", "TestTfidfvectorizerTfUniandbigramsSkip5", NewTestTfidfvectorizerTfUniandbigramsSkip5) - testbackend.Register("ThresholdedRelu", "TestThresholdedrelu", NewTestThresholdedrelu) - testbackend.Register("ThresholdedRelu", "TestThresholdedreluDefault", NewTestThresholdedreluDefault) - testbackend.Register("ThresholdedRelu", "TestThresholdedreluExample", NewTestThresholdedreluExample) - testbackend.Register("Tile", "TestTile", NewTestTile) - testbackend.Register("Tile", "TestTilePrecomputed", NewTestTilePrecomputed) - testbackend.Register("Transpose", "TestTransposeAllPermutations0", NewTestTransposeAllPermutations0) - testbackend.Register("Transpose", "TestTransposeAllPermutations1", NewTestTransposeAllPermutations1) - testbackend.Register("Transpose", "TestTransposeAllPermutations2", NewTestTransposeAllPermutations2) - testbackend.Register("Transpose", "TestTransposeAllPermutations3", NewTestTransposeAllPermutations3) - testbackend.Register("Transpose", "TestTransposeAllPermutations4", NewTestTransposeAllPermutations4) - testbackend.Register("Transpose", "TestTransposeAllPermutations5", NewTestTransposeAllPermutations5) - testbackend.Register("Transpose", "TestTransposeDefault", NewTestTransposeDefault) - testbackend.Register("Unsqueeze", "TestUnsqueeze", NewTestUnsqueeze) - testbackend.Register("Upsample", "TestUpsampleNearest", NewTestUpsampleNearest) -} From e2d10a96ba7e713ee349b86a51bb56dc19a709b3 Mon Sep 17 00:00:00 2001 From: Olivier Wulveryck Date: Wed, 22 May 2019 11:52:54 +0200 Subject: [PATCH 3/7] chore: fix some tests and test the tests --- backend/testbackend/onnx/gen_cmd/generate.go | 37 ++++++++-- .../testbackend/onnx/gen_cmd/test_template.go | 45 ++++++++---- .../testbackend/onnx/onnx_test_abs_test.go | 26 +++++++ .../onnx/onnx_test_acos_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_acos_test.go | 26 +++++++ .../onnx/onnx_test_acosh_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_acosh_test.go | 26 +++++++ .../onnx/onnx_test_add_bcast_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_add_test.go | 26 +++++++ .../onnx_test_argmax_default_axis_example.go | 2 +- ...x_test_argmax_default_axis_example_test.go | 26 +++++++ .../onnx_test_argmax_default_axis_random.go | 2 +- ...nx_test_argmax_default_axis_random_test.go | 26 +++++++ .../onnx/onnx_test_argmax_keepdims_example.go | 4 +- .../onnx_test_argmax_keepdims_example_test.go | 26 +++++++ .../onnx/onnx_test_argmax_keepdims_random.go | 4 +- .../onnx_test_argmax_keepdims_random_test.go | 26 +++++++ .../onnx_test_argmax_no_keepdims_example.go | 4 +- ...nx_test_argmax_no_keepdims_example_test.go | 26 +++++++ .../onnx_test_argmax_no_keepdims_random.go | 4 +- ...nnx_test_argmax_no_keepdims_random_test.go | 26 +++++++ .../onnx_test_argmin_default_axis_example.go | 2 +- ...x_test_argmin_default_axis_example_test.go | 26 +++++++ .../onnx_test_argmin_default_axis_random.go | 2 +- ...nx_test_argmin_default_axis_random_test.go | 26 +++++++ .../onnx/onnx_test_argmin_keepdims_example.go | 4 +- .../onnx_test_argmin_keepdims_example_test.go | 26 +++++++ .../onnx/onnx_test_argmin_keepdims_random.go | 4 +- .../onnx_test_argmin_keepdims_random_test.go | 26 +++++++ .../onnx_test_argmin_no_keepdims_example.go | 4 +- ...nx_test_argmin_no_keepdims_example_test.go | 26 +++++++ .../onnx_test_argmin_no_keepdims_random.go | 4 +- ...nnx_test_argmin_no_keepdims_random_test.go | 26 +++++++ .../onnx/onnx_test_asin_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_asin_test.go | 26 +++++++ .../onnx/onnx_test_asinh_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_asinh_test.go | 26 +++++++ .../onnx/onnx_test_atan_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_atan_test.go | 26 +++++++ .../onnx/onnx_test_atanh_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_atanh_test.go | 26 +++++++ .../onnx/onnx_test_averagepool_1d_default.go | 2 +- .../onnx_test_averagepool_1d_default_test.go | 26 +++++++ .../onnx/onnx_test_averagepool_2d_ceil.go | 6 +- .../onnx_test_averagepool_2d_ceil_test.go | 26 +++++++ .../onnx/onnx_test_averagepool_2d_default.go | 2 +- .../onnx_test_averagepool_2d_default_test.go | 26 +++++++ .../onnx/onnx_test_averagepool_2d_pads.go | 4 +- ...t_averagepool_2d_pads_count_include_pad.go | 6 +- ...ragepool_2d_pads_count_include_pad_test.go | 26 +++++++ .../onnx_test_averagepool_2d_pads_test.go | 26 +++++++ ...nx_test_averagepool_2d_precomputed_pads.go | 4 +- ...l_2d_precomputed_pads_count_include_pad.go | 6 +- ...precomputed_pads_count_include_pad_test.go | 26 +++++++ ...st_averagepool_2d_precomputed_pads_test.go | 26 +++++++ ...t_averagepool_2d_precomputed_same_upper.go | 6 +- ...ragepool_2d_precomputed_same_upper_test.go | 26 +++++++ ...test_averagepool_2d_precomputed_strides.go | 4 +- ...averagepool_2d_precomputed_strides_test.go | 26 +++++++ .../onnx_test_averagepool_2d_same_lower.go | 4 +- ...nnx_test_averagepool_2d_same_lower_test.go | 26 +++++++ .../onnx_test_averagepool_2d_same_upper.go | 4 +- ...nnx_test_averagepool_2d_same_upper_test.go | 26 +++++++ .../onnx/onnx_test_averagepool_2d_strides.go | 4 +- .../onnx_test_averagepool_2d_strides_test.go | 26 +++++++ .../onnx/onnx_test_averagepool_3d_default.go | 2 +- .../onnx_test_averagepool_3d_default_test.go | 26 +++++++ .../onnx/onnx_test_basic_conv_with_padding.go | 4 +- .../onnx_test_basic_conv_with_padding_test.go | 26 +++++++ .../onnx_test_basic_conv_without_padding.go | 4 +- ...nx_test_basic_conv_without_padding_test.go | 26 +++++++ .../onnx/onnx_test_batchnorm_epsilon.go | 2 +- .../onnx/onnx_test_batchnorm_epsilon_test.go | 26 +++++++ .../onnx/onnx_test_batchnorm_example_test.go | 26 +++++++ .../onnx/onnx_test_cast_DOUBLE_to_FLOAT.go | 2 +- .../onnx_test_cast_DOUBLE_to_FLOAT_test.go | 26 +++++++ .../onnx/onnx_test_cast_FLOAT_to_DOUBLE.go | 2 +- .../onnx_test_cast_FLOAT_to_DOUBLE_test.go | 26 +++++++ .../onnx/onnx_test_ceil_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_ceil_test.go | 26 +++++++ backend/testbackend/onnx/onnx_test_clip.go | 4 +- .../onnx_test_clip_default_inbounds_test.go | 26 +++++++ .../onnx/onnx_test_clip_default_max.go | 2 +- .../onnx/onnx_test_clip_default_max_test.go | 26 +++++++ .../onnx/onnx_test_clip_default_min.go | 2 +- .../onnx/onnx_test_clip_default_min_test.go | 26 +++++++ .../onnx/onnx_test_clip_example.go | 4 +- .../onnx/onnx_test_clip_example_test.go | 26 +++++++ .../onnx/onnx_test_clip_inbounds.go | 4 +- .../onnx/onnx_test_clip_inbounds_test.go | 26 +++++++ .../onnx/onnx_test_clip_outbounds.go | 4 +- .../onnx/onnx_test_clip_outbounds_test.go | 26 +++++++ .../onnx/onnx_test_clip_splitbounds.go | 4 +- .../onnx/onnx_test_clip_splitbounds_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_clip_test.go | 26 +++++++ .../onnx/onnx_test_concat_1d_axis_0.go | 2 +- .../onnx/onnx_test_concat_1d_axis_0_test.go | 26 +++++++ .../onnx/onnx_test_concat_2d_axis_0.go | 2 +- .../onnx/onnx_test_concat_2d_axis_0_test.go | 26 +++++++ .../onnx/onnx_test_concat_2d_axis_1.go | 2 +- .../onnx/onnx_test_concat_2d_axis_1_test.go | 26 +++++++ .../onnx/onnx_test_concat_3d_axis_0.go | 2 +- .../onnx/onnx_test_concat_3d_axis_0_test.go | 26 +++++++ .../onnx/onnx_test_concat_3d_axis_1.go | 2 +- .../onnx/onnx_test_concat_3d_axis_1_test.go | 26 +++++++ .../onnx/onnx_test_concat_3d_axis_2.go | 2 +- .../onnx/onnx_test_concat_3d_axis_2_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_constant.go | 2 +- .../onnx/onnx_test_constant_pad.go | 6 +- .../onnx/onnx_test_constant_pad_test.go | 26 +++++++ .../onnx/onnx_test_constant_test.go | 26 +++++++ .../onnx_test_constantofshape_float_ones.go | 6 +- ...nx_test_constantofshape_float_ones_test.go | 26 +++++++ .../onnx_test_constantofshape_int_zeros.go | 6 +- ...nnx_test_constantofshape_int_zeros_test.go | 26 +++++++ ...onv_with_strides_and_asymmetric_padding.go | 6 +- ...ith_strides_and_asymmetric_padding_test.go | 26 +++++++ .../onnx_test_conv_with_strides_no_padding.go | 6 +- ..._test_conv_with_strides_no_padding_test.go | 26 +++++++ .../onnx_test_conv_with_strides_padding.go | 6 +- ...nnx_test_conv_with_strides_padding_test.go | 26 +++++++ .../onnx/onnx_test_convtranspose_1d_test.go | 26 +++++++ .../onnx/onnx_test_convtranspose_3d_test.go | 26 +++++++ .../onnx/onnx_test_convtranspose_dilations.go | 2 +- .../onnx_test_convtranspose_dilations_test.go | 26 +++++++ .../onnx_test_convtranspose_kernel_shape.go | 8 +-- ...nx_test_convtranspose_kernel_shape_test.go | 26 +++++++ .../onnx_test_convtranspose_output_shape.go | 4 +- ...nx_test_convtranspose_output_shape_test.go | 26 +++++++ .../onnx/onnx_test_convtranspose_pad.go | 4 +- .../onnx/onnx_test_convtranspose_pad_test.go | 26 +++++++ .../onnx/onnx_test_convtranspose_pads.go | 4 +- .../onnx/onnx_test_convtranspose_pads_test.go | 26 +++++++ .../onnx/onnx_test_convtranspose_test.go | 26 +++++++ .../onnx_test_convtranspose_with_kernel.go | 8 +-- ...nnx_test_convtranspose_with_kernel_test.go | 26 +++++++ .../onnx/onnx_test_cos_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_cos_test.go | 26 +++++++ .../onnx/onnx_test_cosh_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_cosh_test.go | 26 +++++++ .../onnx/onnx_test_depthtospace.go | 2 +- .../onnx/onnx_test_depthtospace_example.go | 2 +- .../onnx_test_depthtospace_example_test.go | 26 +++++++ .../onnx/onnx_test_depthtospace_test.go | 26 +++++++ .../onnx/onnx_test_div_bcast_test.go | 26 +++++++ .../onnx/onnx_test_div_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_div_test.go | 26 +++++++ .../onnx/onnx_test_dropout_default_test.go | 26 +++++++ .../onnx/onnx_test_dropout_random.go | 2 +- .../onnx/onnx_test_dropout_random_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_edge_pad.go | 4 +- .../onnx/onnx_test_edge_pad_test.go | 26 +++++++ backend/testbackend/onnx/onnx_test_elu.go | 2 +- .../onnx/onnx_test_elu_default_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_elu_example.go | 2 +- .../onnx/onnx_test_elu_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_elu_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_erf_test.go | 26 +++++++ .../onnx/onnx_test_exp_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_exp_test.go | 26 +++++++ .../onnx/onnx_test_expand_dim_changed_test.go | 26 +++++++ .../onnx_test_expand_dim_unchanged_test.go | 26 +++++++ ...test_eyelike_populate_off_main_diagonal.go | 4 +- ...eyelike_populate_off_main_diagonal_test.go | 26 +++++++ .../onnx/onnx_test_eyelike_with_dtype.go | 2 +- .../onnx/onnx_test_eyelike_with_dtype_test.go | 26 +++++++ .../onnx_test_eyelike_without_dtype_test.go | 26 +++++++ .../onnx/onnx_test_flatten_axis0.go | 2 +- .../onnx/onnx_test_flatten_axis0_test.go | 26 +++++++ .../onnx/onnx_test_flatten_axis1.go | 2 +- .../onnx/onnx_test_flatten_axis1_test.go | 26 +++++++ .../onnx/onnx_test_flatten_axis2.go | 2 +- .../onnx/onnx_test_flatten_axis2_test.go | 26 +++++++ .../onnx/onnx_test_flatten_axis3.go | 2 +- .../onnx/onnx_test_flatten_axis3_test.go | 26 +++++++ .../onnx_test_flatten_default_axis_test.go | 26 +++++++ .../onnx/onnx_test_floor_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_floor_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_gather_0.go | 2 +- .../onnx/onnx_test_gather_0_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_gather_1.go | 2 +- .../onnx/onnx_test_gather_1_test.go | 26 +++++++ .../onnx/onnx_test_gemm_broadcast.go | 8 +-- .../onnx/onnx_test_gemm_broadcast_test.go | 26 +++++++ .../onnx/onnx_test_gemm_nobroadcast.go | 4 +- .../onnx/onnx_test_gemm_nobroadcast_test.go | 26 +++++++ ...test_globalaveragepool_precomputed_test.go | 26 +++++++ .../onnx/onnx_test_globalaveragepool_test.go | 26 +++++++ ...nnx_test_globalmaxpool_precomputed_test.go | 26 +++++++ .../onnx/onnx_test_globalmaxpool_test.go | 26 +++++++ .../onnx/onnx_test_hardmax_axis_0.go | 2 +- .../onnx/onnx_test_hardmax_axis_0_test.go | 26 +++++++ .../onnx/onnx_test_hardmax_axis_1.go | 2 +- .../onnx/onnx_test_hardmax_axis_1_test.go | 26 +++++++ .../onnx/onnx_test_hardmax_axis_2.go | 2 +- .../onnx/onnx_test_hardmax_axis_2_test.go | 26 +++++++ .../onnx_test_hardmax_default_axis_test.go | 26 +++++++ .../onnx/onnx_test_hardmax_example_test.go | 26 +++++++ .../onnx/onnx_test_hardmax_one_hot_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_hardsigmoid.go | 4 +- .../onnx_test_hardsigmoid_default_test.go | 26 +++++++ .../onnx/onnx_test_hardsigmoid_example.go | 4 +- .../onnx_test_hardsigmoid_example_test.go | 26 +++++++ .../onnx/onnx_test_hardsigmoid_test.go | 26 +++++++ .../onnx/onnx_test_identity_test.go | 26 +++++++ .../onnx/onnx_test_instancenorm_epsilon.go | 2 +- .../onnx_test_instancenorm_epsilon_test.go | 26 +++++++ .../onnx_test_instancenorm_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_leakyrelu.go | 2 +- .../onnx/onnx_test_leakyrelu_default_test.go | 26 +++++++ .../onnx/onnx_test_leakyrelu_example.go | 2 +- .../onnx/onnx_test_leakyrelu_example_test.go | 26 +++++++ .../onnx/onnx_test_leakyrelu_test.go | 26 +++++++ .../onnx/onnx_test_log_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_log_test.go | 26 +++++++ .../onnx/onnx_test_logsoftmax_axis_0.go | 2 +- .../onnx/onnx_test_logsoftmax_axis_0_test.go | 26 +++++++ .../onnx/onnx_test_logsoftmax_axis_1.go | 2 +- .../onnx/onnx_test_logsoftmax_axis_1_test.go | 26 +++++++ .../onnx/onnx_test_logsoftmax_axis_2.go | 2 +- .../onnx/onnx_test_logsoftmax_axis_2_test.go | 26 +++++++ .../onnx_test_logsoftmax_default_axis_test.go | 26 +++++++ .../onnx_test_logsoftmax_example_1_test.go | 26 +++++++ .../onnx_test_logsoftmax_large_number_test.go | 26 +++++++ backend/testbackend/onnx/onnx_test_lrn.go | 8 +-- .../testbackend/onnx/onnx_test_lrn_default.go | 2 +- .../onnx/onnx_test_lrn_default_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_lrn_test.go | 26 +++++++ .../onnx/onnx_test_matmul_2d_test.go | 26 +++++++ .../onnx/onnx_test_matmul_3d_test.go | 26 +++++++ .../onnx/onnx_test_matmul_4d_test.go | 26 +++++++ .../onnx/onnx_test_max_example_test.go | 26 +++++++ .../onnx/onnx_test_max_one_input_test.go | 26 +++++++ .../onnx/onnx_test_max_two_inputs_test.go | 26 +++++++ .../onnx/onnx_test_maxpool_1d_default.go | 2 +- .../onnx/onnx_test_maxpool_1d_default_test.go | 26 +++++++ .../onnx/onnx_test_maxpool_2d_ceil.go | 6 +- .../onnx/onnx_test_maxpool_2d_ceil_test.go | 26 +++++++ .../onnx/onnx_test_maxpool_2d_default.go | 2 +- .../onnx/onnx_test_maxpool_2d_default_test.go | 26 +++++++ .../onnx/onnx_test_maxpool_2d_dilations.go | 6 +- .../onnx_test_maxpool_2d_dilations_test.go | 26 +++++++ .../onnx/onnx_test_maxpool_2d_pads.go | 4 +- .../onnx/onnx_test_maxpool_2d_pads_test.go | 26 +++++++ .../onnx_test_maxpool_2d_precomputed_pads.go | 4 +- ...x_test_maxpool_2d_precomputed_pads_test.go | 26 +++++++ ..._test_maxpool_2d_precomputed_same_upper.go | 6 +- ..._maxpool_2d_precomputed_same_upper_test.go | 26 +++++++ ...nnx_test_maxpool_2d_precomputed_strides.go | 4 +- ...est_maxpool_2d_precomputed_strides_test.go | 26 +++++++ .../onnx/onnx_test_maxpool_2d_same_lower.go | 4 +- .../onnx_test_maxpool_2d_same_lower_test.go | 26 +++++++ .../onnx/onnx_test_maxpool_2d_same_upper.go | 4 +- .../onnx_test_maxpool_2d_same_upper_test.go | 26 +++++++ .../onnx/onnx_test_maxpool_2d_strides.go | 4 +- .../onnx/onnx_test_maxpool_2d_strides_test.go | 26 +++++++ .../onnx/onnx_test_maxpool_3d_default.go | 2 +- .../onnx/onnx_test_maxpool_3d_default_test.go | 26 +++++++ ...maxpool_with_argmax_2d_precomputed_pads.go | 4 +- ...ol_with_argmax_2d_precomputed_pads_test.go | 26 +++++++ ...pool_with_argmax_2d_precomputed_strides.go | 6 +- ...with_argmax_2d_precomputed_strides_test.go | 26 +++++++ ...test_maxunpool_export_with_output_shape.go | 4 +- ...maxunpool_export_with_output_shape_test.go | 26 +++++++ ...t_maxunpool_export_without_output_shape.go | 4 +- ...unpool_export_without_output_shape_test.go | 26 +++++++ .../onnx/onnx_test_mean_example_test.go | 26 +++++++ .../onnx/onnx_test_mean_one_input_test.go | 26 +++++++ .../onnx/onnx_test_mean_two_inputs_test.go | 26 +++++++ .../onnx/onnx_test_min_example_test.go | 26 +++++++ .../onnx/onnx_test_min_one_input_test.go | 26 +++++++ .../onnx/onnx_test_min_two_inputs_test.go | 26 +++++++ .../onnx/onnx_test_mod_broadcast.go | 55 ++++++++++++++ .../onnx/onnx_test_mod_broadcast_test.go | 26 +++++++ .../onnx/onnx_test_mod_int64_fmod.go | 57 +++++++++++++++ .../onnx/onnx_test_mod_int64_fmod_test.go | 26 +++++++ .../onnx/onnx_test_mod_mixed_sign_float32.go | 57 +++++++++++++++ .../onnx_test_mod_mixed_sign_float32_test.go | 26 +++++++ .../onnx/onnx_test_mod_mixed_sign_float64.go | 57 +++++++++++++++ .../onnx_test_mod_mixed_sign_float64_test.go | 26 +++++++ .../onnx/onnx_test_mod_mixed_sign_int32.go | 55 ++++++++++++++ .../onnx_test_mod_mixed_sign_int32_test.go | 26 +++++++ .../onnx/onnx_test_mod_mixed_sign_int64.go | 55 ++++++++++++++ .../onnx_test_mod_mixed_sign_int64_test.go | 26 +++++++ .../onnx/onnx_test_mul_bcast_test.go | 26 +++++++ .../onnx/onnx_test_mul_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_mul_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_mvn_test.go | 26 +++++++ .../onnx/onnx_test_neg_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_neg_test.go | 26 +++++++ ...nmaxsuppression_center_point_box_format.go | 72 +++++++++++++++++++ ...uppression_center_point_box_format_test.go | 26 +++++++ ...t_nonmaxsuppression_flipped_coordinates.go | 70 ++++++++++++++++++ ...maxsuppression_flipped_coordinates_test.go | 26 +++++++ ..._test_nonmaxsuppression_identical_boxes.go | 70 ++++++++++++++++++ ..._nonmaxsuppression_identical_boxes_test.go | 26 +++++++ ...est_nonmaxsuppression_limit_output_size.go | 70 ++++++++++++++++++ ...onmaxsuppression_limit_output_size_test.go | 26 +++++++ .../onnx_test_nonmaxsuppression_single_box.go | 70 ++++++++++++++++++ ..._test_nonmaxsuppression_single_box_test.go | 26 +++++++ ..._test_nonmaxsuppression_suppress_by_IOU.go | 70 ++++++++++++++++++ ...xsuppression_suppress_by_IOU_and_scores.go | 70 ++++++++++++++++++ ...ression_suppress_by_IOU_and_scores_test.go | 26 +++++++ ..._nonmaxsuppression_suppress_by_IOU_test.go | 26 +++++++ ...onnx_test_nonmaxsuppression_two_batches.go | 70 ++++++++++++++++++ ...test_nonmaxsuppression_two_batches_test.go | 26 +++++++ ...onnx_test_nonmaxsuppression_two_classes.go | 70 ++++++++++++++++++ ...test_nonmaxsuppression_two_classes_test.go | 26 +++++++ .../onnx/onnx_test_onehot_with_axis.go | 62 ++++++++++++++++ .../onnx/onnx_test_onehot_with_axis_test.go | 26 +++++++ .../onnx/onnx_test_onehot_without_axis.go | 60 ++++++++++++++++ .../onnx_test_onehot_without_axis_test.go | 26 +++++++ .../onnx/onnx_test_pow_bcast_array_test.go | 26 +++++++ .../onnx/onnx_test_pow_bcast_scalar.go | 55 ++++++++++++++ .../onnx/onnx_test_pow_bcast_scalar_test.go | 26 +++++++ .../onnx/onnx_test_pow_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_pow_test.go | 26 +++++++ .../onnx/onnx_test_prelu_broadcast_test.go | 26 +++++++ .../onnx/onnx_test_prelu_example_test.go | 26 +++++++ .../onnx/onnx_test_reciprocal_example_test.go | 26 +++++++ .../onnx/onnx_test_reciprocal_test.go | 26 +++++++ ...reduce_l1_default_axes_keepdims_example.go | 2 +- ...e_l1_default_axes_keepdims_example_test.go | 26 +++++++ ..._reduce_l1_default_axes_keepdims_random.go | 2 +- ...ce_l1_default_axes_keepdims_random_test.go | 26 +++++++ ..._test_reduce_l1_do_not_keepdims_example.go | 4 +- ..._reduce_l1_do_not_keepdims_example_test.go | 26 +++++++ ...x_test_reduce_l1_do_not_keepdims_random.go | 4 +- ...t_reduce_l1_do_not_keepdims_random_test.go | 26 +++++++ .../onnx_test_reduce_l1_keep_dims_example.go | 4 +- ...x_test_reduce_l1_keep_dims_example_test.go | 26 +++++++ .../onnx_test_reduce_l1_keep_dims_random.go | 4 +- ...nx_test_reduce_l1_keep_dims_random_test.go | 26 +++++++ ...reduce_l2_default_axes_keepdims_example.go | 2 +- ...e_l2_default_axes_keepdims_example_test.go | 26 +++++++ ..._reduce_l2_default_axes_keepdims_random.go | 2 +- ...ce_l2_default_axes_keepdims_random_test.go | 26 +++++++ ..._test_reduce_l2_do_not_keepdims_example.go | 4 +- ..._reduce_l2_do_not_keepdims_example_test.go | 26 +++++++ ...x_test_reduce_l2_do_not_keepdims_random.go | 4 +- ...t_reduce_l2_do_not_keepdims_random_test.go | 26 +++++++ .../onnx_test_reduce_l2_keep_dims_example.go | 4 +- ...x_test_reduce_l2_keep_dims_example_test.go | 26 +++++++ .../onnx_test_reduce_l2_keep_dims_random.go | 4 +- ...nx_test_reduce_l2_keep_dims_random_test.go | 26 +++++++ .../onnx/onnx_test_reduce_log_sum.go | 4 +- .../onnx/onnx_test_reduce_log_sum_asc_axes.go | 4 +- .../onnx_test_reduce_log_sum_asc_axes_test.go | 26 +++++++ .../onnx_test_reduce_log_sum_default_test.go | 26 +++++++ .../onnx_test_reduce_log_sum_desc_axes.go | 4 +- ...onnx_test_reduce_log_sum_desc_axes_test.go | 26 +++++++ ...g_sum_exp_default_axes_keepdims_example.go | 2 +- ..._exp_default_axes_keepdims_example_test.go | 26 +++++++ ...og_sum_exp_default_axes_keepdims_random.go | 2 +- ...m_exp_default_axes_keepdims_random_test.go | 26 +++++++ ...uce_log_sum_exp_do_not_keepdims_example.go | 4 +- ...og_sum_exp_do_not_keepdims_example_test.go | 26 +++++++ ...duce_log_sum_exp_do_not_keepdims_random.go | 4 +- ...log_sum_exp_do_not_keepdims_random_test.go | 26 +++++++ ...est_reduce_log_sum_exp_keepdims_example.go | 4 +- ...educe_log_sum_exp_keepdims_example_test.go | 26 +++++++ ...test_reduce_log_sum_exp_keepdims_random.go | 4 +- ...reduce_log_sum_exp_keepdims_random_test.go | 26 +++++++ .../onnx/onnx_test_reduce_log_sum_test.go | 26 +++++++ ...reduce_max_default_axes_keepdim_example.go | 2 +- ...e_max_default_axes_keepdim_example_test.go | 26 +++++++ ...reduce_max_default_axes_keepdims_random.go | 2 +- ...e_max_default_axes_keepdims_random_test.go | 26 +++++++ ...test_reduce_max_do_not_keepdims_example.go | 4 +- ...reduce_max_do_not_keepdims_example_test.go | 26 +++++++ ..._test_reduce_max_do_not_keepdims_random.go | 4 +- ..._reduce_max_do_not_keepdims_random_test.go | 26 +++++++ .../onnx_test_reduce_max_keepdims_example.go | 4 +- ...x_test_reduce_max_keepdims_example_test.go | 26 +++++++ .../onnx_test_reduce_max_keepdims_random.go | 4 +- ...nx_test_reduce_max_keepdims_random_test.go | 26 +++++++ ...duce_mean_default_axes_keepdims_example.go | 2 +- ...mean_default_axes_keepdims_example_test.go | 26 +++++++ ...educe_mean_default_axes_keepdims_random.go | 2 +- ..._mean_default_axes_keepdims_random_test.go | 26 +++++++ ...est_reduce_mean_do_not_keepdims_example.go | 4 +- ...educe_mean_do_not_keepdims_example_test.go | 26 +++++++ ...test_reduce_mean_do_not_keepdims_random.go | 4 +- ...reduce_mean_do_not_keepdims_random_test.go | 26 +++++++ .../onnx_test_reduce_mean_keepdims_example.go | 4 +- ..._test_reduce_mean_keepdims_example_test.go | 26 +++++++ .../onnx_test_reduce_mean_keepdims_random.go | 4 +- ...x_test_reduce_mean_keepdims_random_test.go | 26 +++++++ ...educe_min_default_axes_keepdims_example.go | 2 +- ..._min_default_axes_keepdims_example_test.go | 26 +++++++ ...reduce_min_default_axes_keepdims_random.go | 2 +- ...e_min_default_axes_keepdims_random_test.go | 26 +++++++ ...test_reduce_min_do_not_keepdims_example.go | 4 +- ...reduce_min_do_not_keepdims_example_test.go | 26 +++++++ ..._test_reduce_min_do_not_keepdims_random.go | 4 +- ..._reduce_min_do_not_keepdims_random_test.go | 26 +++++++ .../onnx_test_reduce_min_keepdims_example.go | 4 +- ...x_test_reduce_min_keepdims_example_test.go | 26 +++++++ .../onnx_test_reduce_min_keepdims_random.go | 4 +- ...nx_test_reduce_min_keepdims_random_test.go | 26 +++++++ ...duce_prod_default_axes_keepdims_example.go | 2 +- ...prod_default_axes_keepdims_example_test.go | 26 +++++++ ...educe_prod_default_axes_keepdims_random.go | 2 +- ..._prod_default_axes_keepdims_random_test.go | 26 +++++++ ...est_reduce_prod_do_not_keepdims_example.go | 4 +- ...educe_prod_do_not_keepdims_example_test.go | 26 +++++++ ...test_reduce_prod_do_not_keepdims_random.go | 4 +- ...reduce_prod_do_not_keepdims_random_test.go | 26 +++++++ .../onnx_test_reduce_prod_keepdims_example.go | 4 +- ..._test_reduce_prod_keepdims_example_test.go | 26 +++++++ .../onnx_test_reduce_prod_keepdims_random.go | 4 +- ...x_test_reduce_prod_keepdims_random_test.go | 26 +++++++ ...educe_sum_default_axes_keepdims_example.go | 2 +- ..._sum_default_axes_keepdims_example_test.go | 26 +++++++ ...reduce_sum_default_axes_keepdims_random.go | 2 +- ...e_sum_default_axes_keepdims_random_test.go | 26 +++++++ ...test_reduce_sum_do_not_keepdims_example.go | 4 +- ...reduce_sum_do_not_keepdims_example_test.go | 26 +++++++ ..._test_reduce_sum_do_not_keepdims_random.go | 4 +- ..._reduce_sum_do_not_keepdims_random_test.go | 26 +++++++ .../onnx_test_reduce_sum_keepdims_example.go | 4 +- ...x_test_reduce_sum_keepdims_example_test.go | 26 +++++++ .../onnx_test_reduce_sum_keepdims_random.go | 4 +- ...nx_test_reduce_sum_keepdims_random_test.go | 26 +++++++ ...um_square_default_axes_keepdims_example.go | 2 +- ...uare_default_axes_keepdims_example_test.go | 26 +++++++ ...sum_square_default_axes_keepdims_random.go | 2 +- ...quare_default_axes_keepdims_random_test.go | 26 +++++++ ...duce_sum_square_do_not_keepdims_example.go | 4 +- ...sum_square_do_not_keepdims_example_test.go | 26 +++++++ ...educe_sum_square_do_not_keepdims_random.go | 4 +- ..._sum_square_do_not_keepdims_random_test.go | 26 +++++++ ...test_reduce_sum_square_keepdims_example.go | 4 +- ...reduce_sum_square_keepdims_example_test.go | 26 +++++++ ..._test_reduce_sum_square_keepdims_random.go | 4 +- ..._reduce_sum_square_keepdims_random_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_reflect_pad.go | 4 +- .../onnx/onnx_test_reflect_pad_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_relu_test.go | 26 +++++++ .../onnx_test_reshape_extended_dims_test.go | 26 +++++++ .../onnx_test_reshape_negative_dim_test.go | 26 +++++++ .../onnx/onnx_test_reshape_one_dim.go | 55 ++++++++++++++ .../onnx/onnx_test_reshape_one_dim_test.go | 26 +++++++ .../onnx_test_reshape_reduced_dims_test.go | 26 +++++++ .../onnx_test_reshape_reordered_dims_test.go | 26 +++++++ .../onnx_test_resize_downsample_linear.go | 2 +- ...onnx_test_resize_downsample_linear_test.go | 26 +++++++ .../onnx_test_resize_downsample_nearest.go | 2 +- ...nnx_test_resize_downsample_nearest_test.go | 26 +++++++ .../onnx/onnx_test_resize_nearest.go | 2 +- .../onnx/onnx_test_resize_nearest_test.go | 26 +++++++ .../onnx/onnx_test_resize_upsample_linear.go | 2 +- .../onnx_test_resize_upsample_linear_test.go | 26 +++++++ .../onnx/onnx_test_resize_upsample_nearest.go | 2 +- .../onnx_test_resize_upsample_nearest_test.go | 26 +++++++ .../onnx/onnx_test_reversesequence_batch.go | 58 +++++++++++++++ .../onnx_test_reversesequence_batch_test.go | 26 +++++++ .../onnx/onnx_test_reversesequence_time.go | 58 +++++++++++++++ .../onnx_test_reversesequence_time_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_roialign.go | 65 +++++++++++++++++ .../onnx/onnx_test_roialign_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_scan9_sum.go | 4 +- .../onnx/onnx_test_scan9_sum_test.go | 26 +++++++ .../onnx/onnx_test_scatter_with_axis.go | 2 +- .../onnx/onnx_test_scatter_with_axis_test.go | 26 +++++++ .../onnx_test_scatter_without_axis_test.go | 26 +++++++ backend/testbackend/onnx/onnx_test_selu.go | 4 +- .../onnx/onnx_test_selu_default_test.go | 26 +++++++ .../onnx/onnx_test_selu_example.go | 4 +- .../onnx/onnx_test_selu_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_selu_test.go | 26 +++++++ .../onnx/onnx_test_shape_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_shape_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_shrink_hard.go | 2 +- .../onnx/onnx_test_shrink_hard_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_shrink_soft.go | 4 +- .../onnx/onnx_test_shrink_soft_test.go | 26 +++++++ .../onnx/onnx_test_sigmoid_example_test.go | 26 +++++++ .../onnx/onnx_test_sigmoid_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_sign_test.go | 26 +++++++ .../onnx/onnx_test_sin_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_sin_test.go | 26 +++++++ .../onnx/onnx_test_sinh_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_sinh_test.go | 26 +++++++ backend/testbackend/onnx/onnx_test_size.go | 50 +++++++++++++ .../onnx/onnx_test_size_example.go | 50 +++++++++++++ .../onnx/onnx_test_size_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_size_test.go | 26 +++++++ .../onnx/onnx_test_slice_default_axes_test.go | 26 +++++++ .../onnx_test_slice_default_steps_test.go | 26 +++++++ .../onnx/onnx_test_slice_end_out_of_bounds.go | 70 ++++++++++++++++++ .../onnx_test_slice_end_out_of_bounds_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_slice_neg.go | 70 ++++++++++++++++++ .../onnx/onnx_test_slice_neg_steps_test.go | 26 +++++++ .../onnx/onnx_test_slice_neg_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_slice_test.go | 26 +++++++ .../onnx/onnx_test_softmax_axis_0.go | 2 +- .../onnx/onnx_test_softmax_axis_0_test.go | 26 +++++++ .../onnx/onnx_test_softmax_axis_1.go | 2 +- .../onnx/onnx_test_softmax_axis_1_test.go | 26 +++++++ .../onnx/onnx_test_softmax_axis_2.go | 2 +- .../onnx/onnx_test_softmax_axis_2_test.go | 26 +++++++ .../onnx_test_softmax_default_axis_test.go | 26 +++++++ .../onnx/onnx_test_softmax_example_test.go | 26 +++++++ .../onnx_test_softmax_large_number_test.go | 26 +++++++ .../onnx/onnx_test_softplus_example_test.go | 26 +++++++ .../onnx/onnx_test_softplus_test.go | 26 +++++++ .../onnx/onnx_test_softsign_example_test.go | 26 +++++++ .../onnx/onnx_test_softsign_test.go | 26 +++++++ .../onnx/onnx_test_split_equal_parts_1d.go | 2 +- .../onnx_test_split_equal_parts_1d_test.go | 26 +++++++ .../onnx/onnx_test_split_equal_parts_2d.go | 2 +- .../onnx_test_split_equal_parts_2d_test.go | 26 +++++++ ...est_split_equal_parts_default_axis_test.go | 26 +++++++ .../onnx/onnx_test_split_variable_parts_1d.go | 4 +- .../onnx_test_split_variable_parts_1d_test.go | 26 +++++++ .../onnx/onnx_test_split_variable_parts_2d.go | 4 +- .../onnx_test_split_variable_parts_2d_test.go | 26 +++++++ ..._test_split_variable_parts_default_axis.go | 2 +- ..._split_variable_parts_default_axis_test.go | 26 +++++++ .../onnx/onnx_test_sqrt_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_sqrt_test.go | 26 +++++++ backend/testbackend/onnx/onnx_test_squeeze.go | 2 +- .../onnx/onnx_test_squeeze_test.go | 26 +++++++ .../onnx/onnx_test_sub_bcast_test.go | 26 +++++++ .../onnx/onnx_test_sub_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_sub_test.go | 26 +++++++ .../onnx/onnx_test_sum_example_test.go | 26 +++++++ .../onnx/onnx_test_sum_one_input_test.go | 26 +++++++ .../onnx/onnx_test_sum_two_inputs_test.go | 26 +++++++ .../onnx/onnx_test_tan_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_tan_test.go | 26 +++++++ .../onnx/onnx_test_tanh_example_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_tanh_test.go | 26 +++++++ ...dfvectorizer_tf_batch_onlybigrams_skip0.go | 14 ++-- ...torizer_tf_batch_onlybigrams_skip0_test.go | 26 +++++++ ...dfvectorizer_tf_batch_onlybigrams_skip5.go | 14 ++-- ...torizer_tf_batch_onlybigrams_skip5_test.go | 26 +++++++ ...vectorizer_tf_batch_uniandbigrams_skip5.go | 14 ++-- ...rizer_tf_batch_uniandbigrams_skip5_test.go | 26 +++++++ ...t_tfidfvectorizer_tf_only_bigrams_skip0.go | 14 ++-- ...dfvectorizer_tf_only_bigrams_skip0_test.go | 26 +++++++ ...idfvectorizer_tf_onlybigrams_levelempty.go | 14 ++-- ...ctorizer_tf_onlybigrams_levelempty_test.go | 26 +++++++ ...st_tfidfvectorizer_tf_onlybigrams_skip5.go | 14 ++-- ...idfvectorizer_tf_onlybigrams_skip5_test.go | 26 +++++++ ..._tfidfvectorizer_tf_uniandbigrams_skip5.go | 14 ++-- ...fvectorizer_tf_uniandbigrams_skip5_test.go | 26 +++++++ .../onnx/onnx_test_thresholdedrelu.go | 2 +- .../onnx_test_thresholdedrelu_default_test.go | 26 +++++++ .../onnx/onnx_test_thresholdedrelu_example.go | 2 +- .../onnx_test_thresholdedrelu_example_test.go | 26 +++++++ .../onnx/onnx_test_thresholdedrelu_test.go | 26 +++++++ .../onnx/onnx_test_tile_precomputed_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_tile_test.go | 26 +++++++ backend/testbackend/onnx/onnx_test_top_k.go | 60 ++++++++++++++++ .../testbackend/onnx/onnx_test_top_k_test.go | 26 +++++++ .../onnx_test_transpose_all_permutations_0.go | 2 +- ..._test_transpose_all_permutations_0_test.go | 26 +++++++ .../onnx_test_transpose_all_permutations_1.go | 2 +- ..._test_transpose_all_permutations_1_test.go | 26 +++++++ .../onnx_test_transpose_all_permutations_2.go | 2 +- ..._test_transpose_all_permutations_2_test.go | 26 +++++++ .../onnx_test_transpose_all_permutations_3.go | 2 +- ..._test_transpose_all_permutations_3_test.go | 26 +++++++ .../onnx_test_transpose_all_permutations_4.go | 2 +- ..._test_transpose_all_permutations_4_test.go | 26 +++++++ .../onnx_test_transpose_all_permutations_5.go | 2 +- ..._test_transpose_all_permutations_5_test.go | 26 +++++++ .../onnx/onnx_test_transpose_default_test.go | 26 +++++++ .../testbackend/onnx/onnx_test_unsqueeze.go | 2 +- .../onnx/onnx_test_unsqueeze_test.go | 26 +++++++ .../onnx/onnx_test_upsample_nearest.go | 2 +- .../onnx/onnx_test_upsample_nearest_test.go | 26 +++++++ 574 files changed, 11180 insertions(+), 381 deletions(-) create mode 100644 backend/testbackend/onnx/onnx_test_abs_test.go create mode 100644 backend/testbackend/onnx/onnx_test_acos_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_acos_test.go create mode 100644 backend/testbackend/onnx/onnx_test_acosh_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_acosh_test.go create mode 100644 backend/testbackend/onnx/onnx_test_add_bcast_test.go create mode 100644 backend/testbackend/onnx/onnx_test_add_test.go create mode 100644 backend/testbackend/onnx/onnx_test_argmax_default_axis_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_argmax_default_axis_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_argmax_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_argmax_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_argmax_no_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_argmax_no_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_argmin_default_axis_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_argmin_default_axis_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_argmin_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_argmin_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_argmin_no_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_argmin_no_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_asin_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_asin_test.go create mode 100644 backend/testbackend/onnx/onnx_test_asinh_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_asinh_test.go create mode 100644 backend/testbackend/onnx/onnx_test_atan_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_atan_test.go create mode 100644 backend/testbackend/onnx/onnx_test_atanh_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_atanh_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_1d_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_2d_ceil_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_2d_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_2d_pads_count_include_pad_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_2d_pads_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads_count_include_pad_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_same_upper_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_strides_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_2d_same_lower_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_2d_same_upper_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_2d_strides_test.go create mode 100644 backend/testbackend/onnx/onnx_test_averagepool_3d_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_basic_conv_with_padding_test.go create mode 100644 backend/testbackend/onnx/onnx_test_basic_conv_without_padding_test.go create mode 100644 backend/testbackend/onnx/onnx_test_batchnorm_epsilon_test.go create mode 100644 backend/testbackend/onnx/onnx_test_batchnorm_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_cast_DOUBLE_to_FLOAT_test.go create mode 100644 backend/testbackend/onnx/onnx_test_cast_FLOAT_to_DOUBLE_test.go create mode 100644 backend/testbackend/onnx/onnx_test_ceil_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_ceil_test.go create mode 100644 backend/testbackend/onnx/onnx_test_clip_default_inbounds_test.go create mode 100644 backend/testbackend/onnx/onnx_test_clip_default_max_test.go create mode 100644 backend/testbackend/onnx/onnx_test_clip_default_min_test.go create mode 100644 backend/testbackend/onnx/onnx_test_clip_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_clip_inbounds_test.go create mode 100644 backend/testbackend/onnx/onnx_test_clip_outbounds_test.go create mode 100644 backend/testbackend/onnx/onnx_test_clip_splitbounds_test.go create mode 100644 backend/testbackend/onnx/onnx_test_clip_test.go create mode 100644 backend/testbackend/onnx/onnx_test_concat_1d_axis_0_test.go create mode 100644 backend/testbackend/onnx/onnx_test_concat_2d_axis_0_test.go create mode 100644 backend/testbackend/onnx/onnx_test_concat_2d_axis_1_test.go create mode 100644 backend/testbackend/onnx/onnx_test_concat_3d_axis_0_test.go create mode 100644 backend/testbackend/onnx/onnx_test_concat_3d_axis_1_test.go create mode 100644 backend/testbackend/onnx/onnx_test_concat_3d_axis_2_test.go create mode 100644 backend/testbackend/onnx/onnx_test_constant_pad_test.go create mode 100644 backend/testbackend/onnx/onnx_test_constant_test.go create mode 100644 backend/testbackend/onnx/onnx_test_constantofshape_float_ones_test.go create mode 100644 backend/testbackend/onnx/onnx_test_constantofshape_int_zeros_test.go create mode 100644 backend/testbackend/onnx/onnx_test_conv_with_strides_and_asymmetric_padding_test.go create mode 100644 backend/testbackend/onnx/onnx_test_conv_with_strides_no_padding_test.go create mode 100644 backend/testbackend/onnx/onnx_test_conv_with_strides_padding_test.go create mode 100644 backend/testbackend/onnx/onnx_test_convtranspose_1d_test.go create mode 100644 backend/testbackend/onnx/onnx_test_convtranspose_3d_test.go create mode 100644 backend/testbackend/onnx/onnx_test_convtranspose_dilations_test.go create mode 100644 backend/testbackend/onnx/onnx_test_convtranspose_kernel_shape_test.go create mode 100644 backend/testbackend/onnx/onnx_test_convtranspose_output_shape_test.go create mode 100644 backend/testbackend/onnx/onnx_test_convtranspose_pad_test.go create mode 100644 backend/testbackend/onnx/onnx_test_convtranspose_pads_test.go create mode 100644 backend/testbackend/onnx/onnx_test_convtranspose_test.go create mode 100644 backend/testbackend/onnx/onnx_test_convtranspose_with_kernel_test.go create mode 100644 backend/testbackend/onnx/onnx_test_cos_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_cos_test.go create mode 100644 backend/testbackend/onnx/onnx_test_cosh_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_cosh_test.go create mode 100644 backend/testbackend/onnx/onnx_test_depthtospace_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_depthtospace_test.go create mode 100644 backend/testbackend/onnx/onnx_test_div_bcast_test.go create mode 100644 backend/testbackend/onnx/onnx_test_div_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_div_test.go create mode 100644 backend/testbackend/onnx/onnx_test_dropout_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_dropout_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_edge_pad_test.go create mode 100644 backend/testbackend/onnx/onnx_test_elu_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_elu_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_elu_test.go create mode 100644 backend/testbackend/onnx/onnx_test_erf_test.go create mode 100644 backend/testbackend/onnx/onnx_test_exp_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_exp_test.go create mode 100644 backend/testbackend/onnx/onnx_test_expand_dim_changed_test.go create mode 100644 backend/testbackend/onnx/onnx_test_expand_dim_unchanged_test.go create mode 100644 backend/testbackend/onnx/onnx_test_eyelike_populate_off_main_diagonal_test.go create mode 100644 backend/testbackend/onnx/onnx_test_eyelike_with_dtype_test.go create mode 100644 backend/testbackend/onnx/onnx_test_eyelike_without_dtype_test.go create mode 100644 backend/testbackend/onnx/onnx_test_flatten_axis0_test.go create mode 100644 backend/testbackend/onnx/onnx_test_flatten_axis1_test.go create mode 100644 backend/testbackend/onnx/onnx_test_flatten_axis2_test.go create mode 100644 backend/testbackend/onnx/onnx_test_flatten_axis3_test.go create mode 100644 backend/testbackend/onnx/onnx_test_flatten_default_axis_test.go create mode 100644 backend/testbackend/onnx/onnx_test_floor_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_floor_test.go create mode 100644 backend/testbackend/onnx/onnx_test_gather_0_test.go create mode 100644 backend/testbackend/onnx/onnx_test_gather_1_test.go create mode 100644 backend/testbackend/onnx/onnx_test_gemm_broadcast_test.go create mode 100644 backend/testbackend/onnx/onnx_test_gemm_nobroadcast_test.go create mode 100644 backend/testbackend/onnx/onnx_test_globalaveragepool_precomputed_test.go create mode 100644 backend/testbackend/onnx/onnx_test_globalaveragepool_test.go create mode 100644 backend/testbackend/onnx/onnx_test_globalmaxpool_precomputed_test.go create mode 100644 backend/testbackend/onnx/onnx_test_globalmaxpool_test.go create mode 100644 backend/testbackend/onnx/onnx_test_hardmax_axis_0_test.go create mode 100644 backend/testbackend/onnx/onnx_test_hardmax_axis_1_test.go create mode 100644 backend/testbackend/onnx/onnx_test_hardmax_axis_2_test.go create mode 100644 backend/testbackend/onnx/onnx_test_hardmax_default_axis_test.go create mode 100644 backend/testbackend/onnx/onnx_test_hardmax_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_hardmax_one_hot_test.go create mode 100644 backend/testbackend/onnx/onnx_test_hardsigmoid_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_hardsigmoid_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_hardsigmoid_test.go create mode 100644 backend/testbackend/onnx/onnx_test_identity_test.go create mode 100644 backend/testbackend/onnx/onnx_test_instancenorm_epsilon_test.go create mode 100644 backend/testbackend/onnx/onnx_test_instancenorm_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_leakyrelu_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_leakyrelu_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_leakyrelu_test.go create mode 100644 backend/testbackend/onnx/onnx_test_log_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_log_test.go create mode 100644 backend/testbackend/onnx/onnx_test_logsoftmax_axis_0_test.go create mode 100644 backend/testbackend/onnx/onnx_test_logsoftmax_axis_1_test.go create mode 100644 backend/testbackend/onnx/onnx_test_logsoftmax_axis_2_test.go create mode 100644 backend/testbackend/onnx/onnx_test_logsoftmax_default_axis_test.go create mode 100644 backend/testbackend/onnx/onnx_test_logsoftmax_example_1_test.go create mode 100644 backend/testbackend/onnx/onnx_test_logsoftmax_large_number_test.go create mode 100644 backend/testbackend/onnx/onnx_test_lrn_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_lrn_test.go create mode 100644 backend/testbackend/onnx/onnx_test_matmul_2d_test.go create mode 100644 backend/testbackend/onnx/onnx_test_matmul_3d_test.go create mode 100644 backend/testbackend/onnx/onnx_test_matmul_4d_test.go create mode 100644 backend/testbackend/onnx/onnx_test_max_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_max_one_input_test.go create mode 100644 backend/testbackend/onnx/onnx_test_max_two_inputs_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_1d_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_2d_ceil_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_2d_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_2d_dilations_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_2d_pads_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_pads_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_same_upper_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_strides_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_2d_same_lower_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_2d_same_upper_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_2d_strides_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_3d_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_pads_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_strides_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxunpool_export_with_output_shape_test.go create mode 100644 backend/testbackend/onnx/onnx_test_maxunpool_export_without_output_shape_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mean_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mean_one_input_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mean_two_inputs_test.go create mode 100644 backend/testbackend/onnx/onnx_test_min_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_min_one_input_test.go create mode 100644 backend/testbackend/onnx/onnx_test_min_two_inputs_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mod_broadcast.go create mode 100644 backend/testbackend/onnx/onnx_test_mod_broadcast_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mod_int64_fmod.go create mode 100644 backend/testbackend/onnx/onnx_test_mod_int64_fmod_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mod_mixed_sign_float32.go create mode 100644 backend/testbackend/onnx/onnx_test_mod_mixed_sign_float32_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mod_mixed_sign_float64.go create mode 100644 backend/testbackend/onnx/onnx_test_mod_mixed_sign_float64_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mod_mixed_sign_int32.go create mode 100644 backend/testbackend/onnx/onnx_test_mod_mixed_sign_int32_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mod_mixed_sign_int64.go create mode 100644 backend/testbackend/onnx/onnx_test_mod_mixed_sign_int64_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mul_bcast_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mul_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mul_test.go create mode 100644 backend/testbackend/onnx/onnx_test_mvn_test.go create mode 100644 backend/testbackend/onnx/onnx_test_neg_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_neg_test.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_center_point_box_format.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_center_point_box_format_test.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_flipped_coordinates.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_flipped_coordinates_test.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_identical_boxes.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_identical_boxes_test.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_limit_output_size.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_limit_output_size_test.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_single_box.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_single_box_test.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU_and_scores.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU_and_scores_test.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU_test.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_batches.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_batches_test.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_classes.go create mode 100644 backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_classes_test.go create mode 100644 backend/testbackend/onnx/onnx_test_onehot_with_axis.go create mode 100644 backend/testbackend/onnx/onnx_test_onehot_with_axis_test.go create mode 100644 backend/testbackend/onnx/onnx_test_onehot_without_axis.go create mode 100644 backend/testbackend/onnx/onnx_test_onehot_without_axis_test.go create mode 100644 backend/testbackend/onnx/onnx_test_pow_bcast_array_test.go create mode 100644 backend/testbackend/onnx/onnx_test_pow_bcast_scalar.go create mode 100644 backend/testbackend/onnx/onnx_test_pow_bcast_scalar_test.go create mode 100644 backend/testbackend/onnx/onnx_test_pow_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_pow_test.go create mode 100644 backend/testbackend/onnx/onnx_test_prelu_broadcast_test.go create mode 100644 backend/testbackend/onnx/onnx_test_prelu_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reciprocal_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reciprocal_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_log_sum_asc_axes_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_log_sum_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_log_sum_desc_axes_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_log_sum_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdim_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_max_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_max_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_min_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_min_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_random_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reflect_pad_test.go create mode 100644 backend/testbackend/onnx/onnx_test_relu_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reshape_extended_dims_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reshape_negative_dim_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reshape_one_dim.go create mode 100644 backend/testbackend/onnx/onnx_test_reshape_one_dim_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reshape_reduced_dims_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reshape_reordered_dims_test.go create mode 100644 backend/testbackend/onnx/onnx_test_resize_downsample_linear_test.go create mode 100644 backend/testbackend/onnx/onnx_test_resize_downsample_nearest_test.go create mode 100644 backend/testbackend/onnx/onnx_test_resize_nearest_test.go create mode 100644 backend/testbackend/onnx/onnx_test_resize_upsample_linear_test.go create mode 100644 backend/testbackend/onnx/onnx_test_resize_upsample_nearest_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reversesequence_batch.go create mode 100644 backend/testbackend/onnx/onnx_test_reversesequence_batch_test.go create mode 100644 backend/testbackend/onnx/onnx_test_reversesequence_time.go create mode 100644 backend/testbackend/onnx/onnx_test_reversesequence_time_test.go create mode 100644 backend/testbackend/onnx/onnx_test_roialign.go create mode 100644 backend/testbackend/onnx/onnx_test_roialign_test.go create mode 100644 backend/testbackend/onnx/onnx_test_scan9_sum_test.go create mode 100644 backend/testbackend/onnx/onnx_test_scatter_with_axis_test.go create mode 100644 backend/testbackend/onnx/onnx_test_scatter_without_axis_test.go create mode 100644 backend/testbackend/onnx/onnx_test_selu_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_selu_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_selu_test.go create mode 100644 backend/testbackend/onnx/onnx_test_shape_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_shape_test.go create mode 100644 backend/testbackend/onnx/onnx_test_shrink_hard_test.go create mode 100644 backend/testbackend/onnx/onnx_test_shrink_soft_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sigmoid_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sigmoid_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sign_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sin_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sin_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sinh_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sinh_test.go create mode 100644 backend/testbackend/onnx/onnx_test_size.go create mode 100644 backend/testbackend/onnx/onnx_test_size_example.go create mode 100644 backend/testbackend/onnx/onnx_test_size_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_size_test.go create mode 100644 backend/testbackend/onnx/onnx_test_slice_default_axes_test.go create mode 100644 backend/testbackend/onnx/onnx_test_slice_default_steps_test.go create mode 100644 backend/testbackend/onnx/onnx_test_slice_end_out_of_bounds.go create mode 100644 backend/testbackend/onnx/onnx_test_slice_end_out_of_bounds_test.go create mode 100644 backend/testbackend/onnx/onnx_test_slice_neg.go create mode 100644 backend/testbackend/onnx/onnx_test_slice_neg_steps_test.go create mode 100644 backend/testbackend/onnx/onnx_test_slice_neg_test.go create mode 100644 backend/testbackend/onnx/onnx_test_slice_test.go create mode 100644 backend/testbackend/onnx/onnx_test_softmax_axis_0_test.go create mode 100644 backend/testbackend/onnx/onnx_test_softmax_axis_1_test.go create mode 100644 backend/testbackend/onnx/onnx_test_softmax_axis_2_test.go create mode 100644 backend/testbackend/onnx/onnx_test_softmax_default_axis_test.go create mode 100644 backend/testbackend/onnx/onnx_test_softmax_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_softmax_large_number_test.go create mode 100644 backend/testbackend/onnx/onnx_test_softplus_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_softplus_test.go create mode 100644 backend/testbackend/onnx/onnx_test_softsign_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_softsign_test.go create mode 100644 backend/testbackend/onnx/onnx_test_split_equal_parts_1d_test.go create mode 100644 backend/testbackend/onnx/onnx_test_split_equal_parts_2d_test.go create mode 100644 backend/testbackend/onnx/onnx_test_split_equal_parts_default_axis_test.go create mode 100644 backend/testbackend/onnx/onnx_test_split_variable_parts_1d_test.go create mode 100644 backend/testbackend/onnx/onnx_test_split_variable_parts_2d_test.go create mode 100644 backend/testbackend/onnx/onnx_test_split_variable_parts_default_axis_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sqrt_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sqrt_test.go create mode 100644 backend/testbackend/onnx/onnx_test_squeeze_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sub_bcast_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sub_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sub_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sum_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sum_one_input_test.go create mode 100644 backend/testbackend/onnx/onnx_test_sum_two_inputs_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tan_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tan_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tanh_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tanh_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip0_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip5_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_uniandbigrams_skip5_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_only_bigrams_skip0_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_levelempty_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_skip5_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_uniandbigrams_skip5_test.go create mode 100644 backend/testbackend/onnx/onnx_test_thresholdedrelu_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_thresholdedrelu_example_test.go create mode 100644 backend/testbackend/onnx/onnx_test_thresholdedrelu_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tile_precomputed_test.go create mode 100644 backend/testbackend/onnx/onnx_test_tile_test.go create mode 100644 backend/testbackend/onnx/onnx_test_top_k.go create mode 100644 backend/testbackend/onnx/onnx_test_top_k_test.go create mode 100644 backend/testbackend/onnx/onnx_test_transpose_all_permutations_0_test.go create mode 100644 backend/testbackend/onnx/onnx_test_transpose_all_permutations_1_test.go create mode 100644 backend/testbackend/onnx/onnx_test_transpose_all_permutations_2_test.go create mode 100644 backend/testbackend/onnx/onnx_test_transpose_all_permutations_3_test.go create mode 100644 backend/testbackend/onnx/onnx_test_transpose_all_permutations_4_test.go create mode 100644 backend/testbackend/onnx/onnx_test_transpose_all_permutations_5_test.go create mode 100644 backend/testbackend/onnx/onnx_test_transpose_default_test.go create mode 100644 backend/testbackend/onnx/onnx_test_unsqueeze_test.go create mode 100644 backend/testbackend/onnx/onnx_test_upsample_nearest_test.go diff --git a/backend/testbackend/onnx/gen_cmd/generate.go b/backend/testbackend/onnx/gen_cmd/generate.go index 3c534602..e776dd89 100644 --- a/backend/testbackend/onnx/gen_cmd/generate.go +++ b/backend/testbackend/onnx/gen_cmd/generate.go @@ -140,9 +140,19 @@ func processFile(file os.FileInfo) (string, string, error) { if err != nil { return "", "", err } + data := fmt.Sprintf("%#v", t.Data()) + shape := fmt.Sprintf("%#v", t.Shape()) + if len(t.Shape()) == 1 && t.Shape()[0] == 1 { + data = fmt.Sprintf("[]float32{%v}", t.Data()) + } + if len(t.Shape()) == 0 { + data = fmt.Sprintf("[]float32{%v}", t.Data()) + shape = "(1)" + } tv.Input[i] = iO{ - Shape: fmt.Sprintf("%#v", t.Shape()), - Data: fmt.Sprintf("%#v", t.Data()), + Shape: shape, + //Data: fmt.Sprintf("%#v", t.Data()), + Data: data, } } mv.Output = make([]valueInfoProto, len(model.Graph.Output)) @@ -174,9 +184,18 @@ func processFile(file os.FileInfo) (string, string, error) { if err != nil { return "", "", err } + shape := fmt.Sprintf("%#v", t.Shape()) + data := fmt.Sprintf("%#v", t.Data()) + if len(t.Shape()) == 1 && t.Shape()[0] == 1 { + data = fmt.Sprintf("[]float32{%v}", t.Data()) + } + if len(t.Shape()) == 0 { + data = fmt.Sprintf("[]float32{%v}", t.Data()) + shape = "(1)" + } tv.ExpectedOutput[i] = iO{ - Shape: fmt.Sprintf("%#v", t.Shape()), - Data: fmt.Sprintf("%#v", t.Data()), + Shape: shape, + Data: data, } } mv.ValueInfo = make([]valueInfoProto, len(model.Graph.ValueInfo)) @@ -194,18 +213,28 @@ func processFile(file os.FileInfo) (string, string, error) { // TestTemplate output := os.Stdout + outputTest := os.Stdout if *outputdir != "" { output, err = os.Create(filepath.Join(*outputdir, "onnx_"+file.Name()+".go")) if err != nil { return "", "", err } defer output.Close() + outputTest, err = os.Create(filepath.Join(*outputdir, "onnx_"+file.Name()+"_test.go")) + if err != nil { + return "", "", err + } + defer outputTest.Close() } tv.ModelValue = mv err = processTemplate(testTemplate, tv, output) if err != nil { return "", "", err } + err = processTemplate(testTestTemplate, tv, outputTest) + if err != nil { + return "", "", err + } /* err = processTemplate(modelTemplate, mv, output) if err != nil { diff --git a/backend/testbackend/onnx/gen_cmd/test_template.go b/backend/testbackend/onnx/gen_cmd/test_template.go index 8bd828ea..810a7201 100644 --- a/backend/testbackend/onnx/gen_cmd/test_template.go +++ b/backend/testbackend/onnx/gen_cmd/test_template.go @@ -3,9 +3,7 @@ package main import "text/template" var testTemplate = template.Must(template.New("testCase").Parse(testTmpl)) -var testCasesTemplate = template.Must(template.New("testCase").Parse(testCasesTmpl)) - -//var modelTemplate = template.Must(template.New("modelCase").Parse(modelTmpl)) +var testTestTemplate = template.Must(template.New("testTestCase").Parse(testTestTmpl)) type testValue struct { OpType string @@ -58,6 +56,35 @@ type attribute struct { Strings string } +const testTestTmpl = ` +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNew{{ .TestName }}(t *testing.T) { + mytest := New{{ .TestName }}() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} +` + //Model: {{ template "modelCase" .ModelValue }}, const testTmpl = ` @@ -251,15 +278,3 @@ type testCases struct { Title string Constructor string } - -const testCasesTmpl = ` -package onnxtest - -import "github.com/owulveryck/onnx-go/backend/testbackend" - -func init() { -// Register all the test cases -{{ if . }} {{ range . }} -{{ if .OpType }} testbackend.Register({{ .OpType }},"{{ .Title }}",New{{ .Title }}) {{end}} {{ end }} {{end}} -} -` diff --git a/backend/testbackend/onnx/onnx_test_abs_test.go b/backend/testbackend/onnx/onnx_test_abs_test.go new file mode 100644 index 00000000..9ae12f81 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_abs_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAbs(t *testing.T) { + mytest := NewTestAbs() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_acos_example_test.go b/backend/testbackend/onnx/onnx_test_acos_example_test.go new file mode 100644 index 00000000..d2ee190d --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_acos_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAcosExample(t *testing.T) { + mytest := NewTestAcosExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_acos_test.go b/backend/testbackend/onnx/onnx_test_acos_test.go new file mode 100644 index 00000000..0c6d0b00 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_acos_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAcos(t *testing.T) { + mytest := NewTestAcos() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_acosh_example_test.go b/backend/testbackend/onnx/onnx_test_acosh_example_test.go new file mode 100644 index 00000000..b6dfdad2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_acosh_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAcoshExample(t *testing.T) { + mytest := NewTestAcoshExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_acosh_test.go b/backend/testbackend/onnx/onnx_test_acosh_test.go new file mode 100644 index 00000000..18921494 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_acosh_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAcosh(t *testing.T) { + mytest := NewTestAcosh() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_add_bcast_test.go b/backend/testbackend/onnx/onnx_test_add_bcast_test.go new file mode 100644 index 00000000..6e8c91ce --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_add_bcast_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAddBcast(t *testing.T) { + mytest := NewTestAddBcast() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_add_test.go b/backend/testbackend/onnx/onnx_test_add_test.go new file mode 100644 index 00000000..9a796338 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_add_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAdd(t *testing.T) { + mytest := NewTestAdd() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_argmax_default_axis_example.go b/backend/testbackend/onnx/onnx_test_argmax_default_axis_example.go index 41c9c9b8..9a1f9f01 100644 --- a/backend/testbackend/onnx/onnx_test_argmax_default_axis_example.go +++ b/backend/testbackend/onnx/onnx_test_argmax_default_axis_example.go @@ -26,7 +26,7 @@ func NewTestArgmaxDefaultAxisExample() *testbackend.TestCase { Name: "", OpType: "ArgMax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013d000)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000126800)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_argmax_default_axis_example_test.go b/backend/testbackend/onnx/onnx_test_argmax_default_axis_example_test.go new file mode 100644 index 00000000..72873e6f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_argmax_default_axis_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestArgmaxDefaultAxisExample(t *testing.T) { + mytest := NewTestArgmaxDefaultAxisExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_argmax_default_axis_random.go b/backend/testbackend/onnx/onnx_test_argmax_default_axis_random.go index 439f7ff2..d22c8c93 100644 --- a/backend/testbackend/onnx/onnx_test_argmax_default_axis_random.go +++ b/backend/testbackend/onnx/onnx_test_argmax_default_axis_random.go @@ -26,7 +26,7 @@ func NewTestArgmaxDefaultAxisRandom() *testbackend.TestCase { Name: "", OpType: "ArgMax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013d100)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000350300)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_argmax_default_axis_random_test.go b/backend/testbackend/onnx/onnx_test_argmax_default_axis_random_test.go new file mode 100644 index 00000000..bbe8aa6c --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_argmax_default_axis_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestArgmaxDefaultAxisRandom(t *testing.T) { + mytest := NewTestArgmaxDefaultAxisRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_argmax_keepdims_example.go b/backend/testbackend/onnx/onnx_test_argmax_keepdims_example.go index d883f644..759be0ad 100644 --- a/backend/testbackend/onnx/onnx_test_argmax_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_argmax_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestArgmaxKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ArgMax", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00023f100)(name:"axis" type:INT i:1 ), - (*pb.AttributeProto)(0xc00023f200)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000350400)(name:"axis" type:INT i:1 ), + (*pb.AttributeProto)(0xc000350500)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_argmax_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_argmax_keepdims_example_test.go new file mode 100644 index 00000000..9234745e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_argmax_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestArgmaxKeepdimsExample(t *testing.T) { + mytest := NewTestArgmaxKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_argmax_keepdims_random.go b/backend/testbackend/onnx/onnx_test_argmax_keepdims_random.go index 9a1a8c5f..5b612f18 100644 --- a/backend/testbackend/onnx/onnx_test_argmax_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_argmax_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestArgmaxKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ArgMax", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00023f600)(name:"axis" type:INT i:1 ), - (*pb.AttributeProto)(0xc00023f700)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000126e00)(name:"axis" type:INT i:1 ), + (*pb.AttributeProto)(0xc000126f00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_argmax_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_argmax_keepdims_random_test.go new file mode 100644 index 00000000..8efe2063 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_argmax_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestArgmaxKeepdimsRandom(t *testing.T) { + mytest := NewTestArgmaxKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_example.go b/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_example.go index 782f5682..3731ee64 100644 --- a/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestArgmaxNoKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ArgMax", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013d600)(name:"axis" type:INT i:1 ), - (*pb.AttributeProto)(0xc00013d700)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000127400)(name:"axis" type:INT i:1 ), + (*pb.AttributeProto)(0xc000127500)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_example_test.go new file mode 100644 index 00000000..7f15f690 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestArgmaxNoKeepdimsExample(t *testing.T) { + mytest := NewTestArgmaxNoKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_random.go b/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_random.go index 0918502a..98b34ea7 100644 --- a/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestArgmaxNoKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ArgMax", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013db00)(name:"axis" type:INT i:1 ), - (*pb.AttributeProto)(0xc00013dc00)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000350f00)(name:"axis" type:INT i:1 ), + (*pb.AttributeProto)(0xc000351000)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_random_test.go new file mode 100644 index 00000000..31fb4369 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_argmax_no_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestArgmaxNoKeepdimsRandom(t *testing.T) { + mytest := NewTestArgmaxNoKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_argmin_default_axis_example.go b/backend/testbackend/onnx/onnx_test_argmin_default_axis_example.go index 434e55eb..afe8be50 100644 --- a/backend/testbackend/onnx/onnx_test_argmin_default_axis_example.go +++ b/backend/testbackend/onnx/onnx_test_argmin_default_axis_example.go @@ -26,7 +26,7 @@ func NewTestArgminDefaultAxisExample() *testbackend.TestCase { Name: "", OpType: "ArgMin", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00023fc00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000351100)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_argmin_default_axis_example_test.go b/backend/testbackend/onnx/onnx_test_argmin_default_axis_example_test.go new file mode 100644 index 00000000..6eb5585a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_argmin_default_axis_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestArgminDefaultAxisExample(t *testing.T) { + mytest := NewTestArgminDefaultAxisExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_argmin_default_axis_random.go b/backend/testbackend/onnx/onnx_test_argmin_default_axis_random.go index a39a39f9..47e4b777 100644 --- a/backend/testbackend/onnx/onnx_test_argmin_default_axis_random.go +++ b/backend/testbackend/onnx/onnx_test_argmin_default_axis_random.go @@ -26,7 +26,7 @@ func NewTestArgminDefaultAxisRandom() *testbackend.TestCase { Name: "", OpType: "ArgMin", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00039a100)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000351500)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_argmin_default_axis_random_test.go b/backend/testbackend/onnx/onnx_test_argmin_default_axis_random_test.go new file mode 100644 index 00000000..facf12fd --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_argmin_default_axis_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestArgminDefaultAxisRandom(t *testing.T) { + mytest := NewTestArgminDefaultAxisRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_argmin_keepdims_example.go b/backend/testbackend/onnx/onnx_test_argmin_keepdims_example.go index d8987602..1d2ecda1 100644 --- a/backend/testbackend/onnx/onnx_test_argmin_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_argmin_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestArgminKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ArgMin", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00039a200)(name:"axis" type:INT i:1 ), - (*pb.AttributeProto)(0xc00039a300)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000434000)(name:"axis" type:INT i:1 ), + (*pb.AttributeProto)(0xc000434100)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_argmin_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_argmin_keepdims_example_test.go new file mode 100644 index 00000000..b7682475 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_argmin_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestArgminKeepdimsExample(t *testing.T) { + mytest := NewTestArgminKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_argmin_keepdims_random.go b/backend/testbackend/onnx/onnx_test_argmin_keepdims_random.go index 3d9eb61b..63a7e3cf 100644 --- a/backend/testbackend/onnx/onnx_test_argmin_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_argmin_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestArgminKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ArgMin", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0003c2600)(name:"axis" type:INT i:1 ), - (*pb.AttributeProto)(0xc0003c2700)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000126000)(name:"axis" type:INT i:1 ), + (*pb.AttributeProto)(0xc000126100)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_argmin_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_argmin_keepdims_random_test.go new file mode 100644 index 00000000..4e8cf5bb --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_argmin_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestArgminKeepdimsRandom(t *testing.T) { + mytest := NewTestArgminKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_example.go b/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_example.go index b852f958..6ee4e9cf 100644 --- a/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestArgminNoKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ArgMin", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0003c2800)(name:"axis" type:INT i:1 ), - (*pb.AttributeProto)(0xc0003c2900)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000126800)(name:"axis" type:INT i:1 ), + (*pb.AttributeProto)(0xc000126900)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_example_test.go new file mode 100644 index 00000000..1354a4e0 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestArgminNoKeepdimsExample(t *testing.T) { + mytest := NewTestArgminNoKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_random.go b/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_random.go index d31d79bd..0b3bffe7 100644 --- a/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestArgminNoKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ArgMin", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00039ab00)(name:"axis" type:INT i:1 ), - (*pb.AttributeProto)(0xc00039ac00)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000132600)(name:"axis" type:INT i:1 ), + (*pb.AttributeProto)(0xc000132700)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_random_test.go new file mode 100644 index 00000000..954435f5 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_argmin_no_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestArgminNoKeepdimsRandom(t *testing.T) { + mytest := NewTestArgminNoKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_asin_example_test.go b/backend/testbackend/onnx/onnx_test_asin_example_test.go new file mode 100644 index 00000000..bf0f7f94 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_asin_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAsinExample(t *testing.T) { + mytest := NewTestAsinExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_asin_test.go b/backend/testbackend/onnx/onnx_test_asin_test.go new file mode 100644 index 00000000..588cb99e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_asin_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAsin(t *testing.T) { + mytest := NewTestAsin() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_asinh_example_test.go b/backend/testbackend/onnx/onnx_test_asinh_example_test.go new file mode 100644 index 00000000..c8383349 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_asinh_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAsinhExample(t *testing.T) { + mytest := NewTestAsinhExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_asinh_test.go b/backend/testbackend/onnx/onnx_test_asinh_test.go new file mode 100644 index 00000000..55cff08d --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_asinh_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAsinh(t *testing.T) { + mytest := NewTestAsinh() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_atan_example_test.go b/backend/testbackend/onnx/onnx_test_atan_example_test.go new file mode 100644 index 00000000..ae0d72f0 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_atan_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAtanExample(t *testing.T) { + mytest := NewTestAtanExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_atan_test.go b/backend/testbackend/onnx/onnx_test_atan_test.go new file mode 100644 index 00000000..c9b437e3 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_atan_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAtan(t *testing.T) { + mytest := NewTestAtan() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_atanh_example_test.go b/backend/testbackend/onnx/onnx_test_atanh_example_test.go new file mode 100644 index 00000000..28b62387 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_atanh_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAtanhExample(t *testing.T) { + mytest := NewTestAtanhExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_atanh_test.go b/backend/testbackend/onnx/onnx_test_atanh_test.go new file mode 100644 index 00000000..c29eb4e0 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_atanh_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAtanh(t *testing.T) { + mytest := NewTestAtanh() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_1d_default.go b/backend/testbackend/onnx/onnx_test_averagepool_1d_default.go index 03bed1b6..a21ded8c 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_1d_default.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_1d_default.go @@ -26,7 +26,7 @@ func NewTestAveragepool1dDefault() *testbackend.TestCase { Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013cb00)(name:"kernel_shape" type:INTS ints:2 ) + (*pb.AttributeProto)(0xc000133b00)(name:"kernel_shape" type:INTS ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_1d_default_test.go b/backend/testbackend/onnx/onnx_test_averagepool_1d_default_test.go new file mode 100644 index 00000000..b64bbdc3 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_1d_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool1dDefault(t *testing.T) { + mytest := NewTestAveragepool1dDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_ceil.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_ceil.go index e7f14fee..7fd09ddb 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_2d_ceil.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_ceil.go @@ -26,9 +26,9 @@ func NewTestAveragepool2dCeil() *testbackend.TestCase { Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=3 cap=4) { - (*pb.AttributeProto)(0xc00011d400)(name:"ceil_mode" type:INT i:1 ), - (*pb.AttributeProto)(0xc00011d500)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc00011d600)(name:"strides" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000127d00)(name:"ceil_mode" type:INT i:1 ), + (*pb.AttributeProto)(0xc000127e00)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000127f00)(name:"strides" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_ceil_test.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_ceil_test.go new file mode 100644 index 00000000..0ccc953b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_ceil_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool2dCeil(t *testing.T) { + mytest := NewTestAveragepool2dCeil() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_default.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_default.go index 8193ed68..3ecf295a 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_2d_default.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_default.go @@ -26,7 +26,7 @@ func NewTestAveragepool2dDefault() *testbackend.TestCase { Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013cf00)(name:"kernel_shape" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000434100)(name:"kernel_shape" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_default_test.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_default_test.go new file mode 100644 index 00000000..62e61661 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool2dDefault(t *testing.T) { + mytest := NewTestAveragepool2dDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_pads.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_pads.go index b355e602..8c181f8d 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_2d_pads.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_pads.go @@ -26,8 +26,8 @@ func NewTestAveragepool2dPads() *testbackend.TestCase { Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013c200)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc00013c400)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000132400)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000132500)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_pads_count_include_pad.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_pads_count_include_pad.go index 6ad96bff..f2219e5e 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_2d_pads_count_include_pad.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_pads_count_include_pad.go @@ -26,9 +26,9 @@ func NewTestAveragepool2dPadsCountIncludePad() *testbackend.TestCase { Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=3 cap=4) { - (*pb.AttributeProto)(0xc00013c400)(name:"count_include_pad" type:INT i:1 ), - (*pb.AttributeProto)(0xc00013c500)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc00013c600)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000132400)(name:"count_include_pad" type:INT i:1 ), + (*pb.AttributeProto)(0xc000132500)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000132600)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_pads_count_include_pad_test.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_pads_count_include_pad_test.go new file mode 100644 index 00000000..78177c0b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_pads_count_include_pad_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool2dPadsCountIncludePad(t *testing.T) { + mytest := NewTestAveragepool2dPadsCountIncludePad() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_pads_test.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_pads_test.go new file mode 100644 index 00000000..e34c57d7 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_pads_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool2dPads(t *testing.T) { + mytest := NewTestAveragepool2dPads() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads.go index fb53e125..2bbb07fa 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads.go @@ -26,8 +26,8 @@ func NewTestAveragepool2dPrecomputedPads() *testbackend.TestCase { Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013c200)(name:"kernel_shape" type:INTS ints:5 ints:5 ), - (*pb.AttributeProto)(0xc00013c400)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000132300)(name:"kernel_shape" type:INTS ints:5 ints:5 ), + (*pb.AttributeProto)(0xc000132400)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads_count_include_pad.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads_count_include_pad.go index e2e9e329..7bfd5d42 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads_count_include_pad.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads_count_include_pad.go @@ -26,9 +26,9 @@ func NewTestAveragepool2dPrecomputedPadsCountIncludePad() *testbackend.TestCase Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=3 cap=4) { - (*pb.AttributeProto)(0xc00013ca00)(name:"count_include_pad" type:INT i:1 ), - (*pb.AttributeProto)(0xc00013cb00)(name:"kernel_shape" type:INTS ints:5 ints:5 ), - (*pb.AttributeProto)(0xc00013cc00)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126100)(name:"count_include_pad" type:INT i:1 ), + (*pb.AttributeProto)(0xc000126300)(name:"kernel_shape" type:INTS ints:5 ints:5 ), + (*pb.AttributeProto)(0xc000126400)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads_count_include_pad_test.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads_count_include_pad_test.go new file mode 100644 index 00000000..99c0e17e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads_count_include_pad_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool2dPrecomputedPadsCountIncludePad(t *testing.T) { + mytest := NewTestAveragepool2dPrecomputedPadsCountIncludePad() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads_test.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads_test.go new file mode 100644 index 00000000..ca812c5f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_pads_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool2dPrecomputedPads(t *testing.T) { + mytest := NewTestAveragepool2dPrecomputedPads() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_same_upper.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_same_upper.go index ee733002..e271caaf 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_same_upper.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_same_upper.go @@ -26,9 +26,9 @@ func NewTestAveragepool2dPrecomputedSameUpper() *testbackend.TestCase { Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=3 cap=4) { - (*pb.AttributeProto)(0xc00011c800)(name:"auto_pad" type:STRING s:"SAME_UPPER" ), - (*pb.AttributeProto)(0xc00011c900)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc00011ca00)(name:"strides" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126900)(name:"auto_pad" type:STRING s:"SAME_UPPER" ), + (*pb.AttributeProto)(0xc000126a00)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000126b00)(name:"strides" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_same_upper_test.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_same_upper_test.go new file mode 100644 index 00000000..1501fe78 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_same_upper_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool2dPrecomputedSameUpper(t *testing.T) { + mytest := NewTestAveragepool2dPrecomputedSameUpper() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_strides.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_strides.go index d80494e5..3311e5f7 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_strides.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_strides.go @@ -26,8 +26,8 @@ func NewTestAveragepool2dPrecomputedStrides() *testbackend.TestCase { Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011cf00)(name:"kernel_shape" type:INTS ints:2 ints:2 ), - (*pb.AttributeProto)(0xc00011d000)(name:"strides" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000133000)(name:"kernel_shape" type:INTS ints:2 ints:2 ), + (*pb.AttributeProto)(0xc000133100)(name:"strides" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_strides_test.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_strides_test.go new file mode 100644 index 00000000..18cc1131 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_precomputed_strides_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool2dPrecomputedStrides(t *testing.T) { + mytest := NewTestAveragepool2dPrecomputedStrides() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_same_lower.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_same_lower.go index dd9a01d7..b5f4bf64 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_2d_same_lower.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_same_lower.go @@ -26,8 +26,8 @@ func NewTestAveragepool2dSameLower() *testbackend.TestCase { Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013d100)(name:"auto_pad" type:STRING s:"SAME_LOWER" ), - (*pb.AttributeProto)(0xc00013d200)(name:"kernel_shape" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000127200)(name:"auto_pad" type:STRING s:"SAME_LOWER" ), + (*pb.AttributeProto)(0xc000127300)(name:"kernel_shape" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_same_lower_test.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_same_lower_test.go new file mode 100644 index 00000000..8eedadb6 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_same_lower_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool2dSameLower(t *testing.T) { + mytest := NewTestAveragepool2dSameLower() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_same_upper.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_same_upper.go index 4322cacf..020363e5 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_2d_same_upper.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_same_upper.go @@ -26,8 +26,8 @@ func NewTestAveragepool2dSameUpper() *testbackend.TestCase { Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013c400)(name:"auto_pad" type:STRING s:"SAME_UPPER" ), - (*pb.AttributeProto)(0xc00013c500)(name:"kernel_shape" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000132300)(name:"auto_pad" type:STRING s:"SAME_UPPER" ), + (*pb.AttributeProto)(0xc000132400)(name:"kernel_shape" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_same_upper_test.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_same_upper_test.go new file mode 100644 index 00000000..e7d449aa --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_same_upper_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool2dSameUpper(t *testing.T) { + mytest := NewTestAveragepool2dSameUpper() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_strides.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_strides.go index b9285368..fc20ece6 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_2d_strides.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_strides.go @@ -26,8 +26,8 @@ func NewTestAveragepool2dStrides() *testbackend.TestCase { Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013c200)(name:"kernel_shape" type:INTS ints:5 ints:5 ), - (*pb.AttributeProto)(0xc00013c400)(name:"strides" type:INTS ints:3 ints:3 ) + (*pb.AttributeProto)(0xc000126000)(name:"kernel_shape" type:INTS ints:5 ints:5 ), + (*pb.AttributeProto)(0xc000126100)(name:"strides" type:INTS ints:3 ints:3 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_2d_strides_test.go b/backend/testbackend/onnx/onnx_test_averagepool_2d_strides_test.go new file mode 100644 index 00000000..abe34c6b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_2d_strides_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool2dStrides(t *testing.T) { + mytest := NewTestAveragepool2dStrides() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_averagepool_3d_default.go b/backend/testbackend/onnx/onnx_test_averagepool_3d_default.go index d968db7b..2890dd4a 100644 --- a/backend/testbackend/onnx/onnx_test_averagepool_3d_default.go +++ b/backend/testbackend/onnx/onnx_test_averagepool_3d_default.go @@ -26,7 +26,7 @@ func NewTestAveragepool3dDefault() *testbackend.TestCase { Name: "", OpType: "AveragePool", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013c400)(name:"kernel_shape" type:INTS ints:2 ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126100)(name:"kernel_shape" type:INTS ints:2 ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_averagepool_3d_default_test.go b/backend/testbackend/onnx/onnx_test_averagepool_3d_default_test.go new file mode 100644 index 00000000..3d5f04da --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_averagepool_3d_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestAveragepool3dDefault(t *testing.T) { + mytest := NewTestAveragepool3dDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_basic_conv_with_padding.go b/backend/testbackend/onnx/onnx_test_basic_conv_with_padding.go index 460872e7..f9d82056 100644 --- a/backend/testbackend/onnx/onnx_test_basic_conv_with_padding.go +++ b/backend/testbackend/onnx/onnx_test_basic_conv_with_padding.go @@ -26,8 +26,8 @@ func NewTestBasicConvWithPadding() *testbackend.TestCase { Name: "", OpType: "Conv", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013c200)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc00013c400)(name:"pads" type:INTS ints:1 ints:1 ints:1 ints:1 ) + (*pb.AttributeProto)(0xc000132300)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000132400)(name:"pads" type:INTS ints:1 ints:1 ints:1 ints:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_basic_conv_with_padding_test.go b/backend/testbackend/onnx/onnx_test_basic_conv_with_padding_test.go new file mode 100644 index 00000000..490d77bd --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_basic_conv_with_padding_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestBasicConvWithPadding(t *testing.T) { + mytest := NewTestBasicConvWithPadding() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_basic_conv_without_padding.go b/backend/testbackend/onnx/onnx_test_basic_conv_without_padding.go index 2238b3d0..1f5be1d5 100644 --- a/backend/testbackend/onnx/onnx_test_basic_conv_without_padding.go +++ b/backend/testbackend/onnx/onnx_test_basic_conv_without_padding.go @@ -26,8 +26,8 @@ func NewTestBasicConvWithoutPadding() *testbackend.TestCase { Name: "", OpType: "Conv", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011cb00)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc00011cc00)(name:"pads" type:INTS ints:0 ints:0 ints:0 ints:0 ) + (*pb.AttributeProto)(0xc000132d00)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000132e00)(name:"pads" type:INTS ints:0 ints:0 ints:0 ints:0 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_basic_conv_without_padding_test.go b/backend/testbackend/onnx/onnx_test_basic_conv_without_padding_test.go new file mode 100644 index 00000000..0b0f96ac --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_basic_conv_without_padding_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestBasicConvWithoutPadding(t *testing.T) { + mytest := NewTestBasicConvWithoutPadding() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_batchnorm_epsilon.go b/backend/testbackend/onnx/onnx_test_batchnorm_epsilon.go index f67a21de..cc9f5fff 100644 --- a/backend/testbackend/onnx/onnx_test_batchnorm_epsilon.go +++ b/backend/testbackend/onnx/onnx_test_batchnorm_epsilon.go @@ -26,7 +26,7 @@ func NewTestBatchnormEpsilon() *testbackend.TestCase { Name: "", OpType: "BatchNormalization", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011d400)(name:"epsilon" type:FLOAT f:0.01 ) + (*pb.AttributeProto)(0xc000132f00)(name:"epsilon" type:FLOAT f:0.01 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_batchnorm_epsilon_test.go b/backend/testbackend/onnx/onnx_test_batchnorm_epsilon_test.go new file mode 100644 index 00000000..7b2e6c74 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_batchnorm_epsilon_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestBatchnormEpsilon(t *testing.T) { + mytest := NewTestBatchnormEpsilon() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_batchnorm_example_test.go b/backend/testbackend/onnx/onnx_test_batchnorm_example_test.go new file mode 100644 index 00000000..e34c635b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_batchnorm_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestBatchnormExample(t *testing.T) { + mytest := NewTestBatchnormExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_cast_DOUBLE_to_FLOAT.go b/backend/testbackend/onnx/onnx_test_cast_DOUBLE_to_FLOAT.go index 139b3fa0..28a4c7cb 100644 --- a/backend/testbackend/onnx/onnx_test_cast_DOUBLE_to_FLOAT.go +++ b/backend/testbackend/onnx/onnx_test_cast_DOUBLE_to_FLOAT.go @@ -26,7 +26,7 @@ func NewTestCastDOUBLEToFLOAT() *testbackend.TestCase { Name: "", OpType: "Cast", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011d800)(name:"to" type:INT i:1 ) + (*pb.AttributeProto)(0xc000132400)(name:"to" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_cast_DOUBLE_to_FLOAT_test.go b/backend/testbackend/onnx/onnx_test_cast_DOUBLE_to_FLOAT_test.go new file mode 100644 index 00000000..fd03a26f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_cast_DOUBLE_to_FLOAT_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestCastDOUBLEToFLOAT(t *testing.T) { + mytest := NewTestCastDOUBLEToFLOAT() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_cast_FLOAT_to_DOUBLE.go b/backend/testbackend/onnx/onnx_test_cast_FLOAT_to_DOUBLE.go index f1b588cb..992d280c 100644 --- a/backend/testbackend/onnx/onnx_test_cast_FLOAT_to_DOUBLE.go +++ b/backend/testbackend/onnx/onnx_test_cast_FLOAT_to_DOUBLE.go @@ -26,7 +26,7 @@ func NewTestCastFLOATToDOUBLE() *testbackend.TestCase { Name: "", OpType: "Cast", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011dd00)(name:"to" type:INT i:11 ) + (*pb.AttributeProto)(0xc000126b00)(name:"to" type:INT i:11 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_cast_FLOAT_to_DOUBLE_test.go b/backend/testbackend/onnx/onnx_test_cast_FLOAT_to_DOUBLE_test.go new file mode 100644 index 00000000..e9279c2d --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_cast_FLOAT_to_DOUBLE_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestCastFLOATToDOUBLE(t *testing.T) { + mytest := NewTestCastFLOATToDOUBLE() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_ceil_example_test.go b/backend/testbackend/onnx/onnx_test_ceil_example_test.go new file mode 100644 index 00000000..1b2c11ba --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_ceil_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestCeilExample(t *testing.T) { + mytest := NewTestCeilExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_ceil_test.go b/backend/testbackend/onnx/onnx_test_ceil_test.go new file mode 100644 index 00000000..064290f8 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_ceil_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestCeil(t *testing.T) { + mytest := NewTestCeil() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_clip.go b/backend/testbackend/onnx/onnx_test_clip.go index 1c5b1924..395cb9fd 100644 --- a/backend/testbackend/onnx/onnx_test_clip.go +++ b/backend/testbackend/onnx/onnx_test_clip.go @@ -26,8 +26,8 @@ func NewTestClip() *testbackend.TestCase { Name: "", OpType: "Clip", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013d400)(name:"max" type:FLOAT f:1 ), - (*pb.AttributeProto)(0xc00013d500)(name:"min" type:FLOAT f:-1 ) + (*pb.AttributeProto)(0xc000127300)(name:"max" type:FLOAT f:1 ), + (*pb.AttributeProto)(0xc000127400)(name:"min" type:FLOAT f:-1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_clip_default_inbounds_test.go b/backend/testbackend/onnx/onnx_test_clip_default_inbounds_test.go new file mode 100644 index 00000000..9b58a733 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_clip_default_inbounds_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestClipDefaultInbounds(t *testing.T) { + mytest := NewTestClipDefaultInbounds() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_clip_default_max.go b/backend/testbackend/onnx/onnx_test_clip_default_max.go index 0ac50862..86a92057 100644 --- a/backend/testbackend/onnx/onnx_test_clip_default_max.go +++ b/backend/testbackend/onnx/onnx_test_clip_default_max.go @@ -26,7 +26,7 @@ func NewTestClipDefaultMax() *testbackend.TestCase { Name: "", OpType: "Clip", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc0007da600)(name:"max" type:FLOAT ) + (*pb.AttributeProto)(0xc000133000)(name:"max" type:FLOAT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_clip_default_max_test.go b/backend/testbackend/onnx/onnx_test_clip_default_max_test.go new file mode 100644 index 00000000..51df0783 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_clip_default_max_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestClipDefaultMax(t *testing.T) { + mytest := NewTestClipDefaultMax() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_clip_default_min.go b/backend/testbackend/onnx/onnx_test_clip_default_min.go index 6fa0ade3..4827836d 100644 --- a/backend/testbackend/onnx/onnx_test_clip_default_min.go +++ b/backend/testbackend/onnx/onnx_test_clip_default_min.go @@ -26,7 +26,7 @@ func NewTestClipDefaultMin() *testbackend.TestCase { Name: "", OpType: "Clip", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013df00)(name:"min" type:FLOAT ) + (*pb.AttributeProto)(0xc000133600)(name:"min" type:FLOAT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_clip_default_min_test.go b/backend/testbackend/onnx/onnx_test_clip_default_min_test.go new file mode 100644 index 00000000..871df1fa --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_clip_default_min_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestClipDefaultMin(t *testing.T) { + mytest := NewTestClipDefaultMin() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_clip_example.go b/backend/testbackend/onnx/onnx_test_clip_example.go index 75c5b3d3..1270a9d8 100644 --- a/backend/testbackend/onnx/onnx_test_clip_example.go +++ b/backend/testbackend/onnx/onnx_test_clip_example.go @@ -26,8 +26,8 @@ func NewTestClipExample() *testbackend.TestCase { Name: "", OpType: "Clip", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0007dab00)(name:"max" type:FLOAT f:1 ), - (*pb.AttributeProto)(0xc0007dac00)(name:"min" type:FLOAT f:-1 ) + (*pb.AttributeProto)(0xc000118600)(name:"max" type:FLOAT f:1 ), + (*pb.AttributeProto)(0xc000118700)(name:"min" type:FLOAT f:-1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_clip_example_test.go b/backend/testbackend/onnx/onnx_test_clip_example_test.go new file mode 100644 index 00000000..9e618555 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_clip_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestClipExample(t *testing.T) { + mytest := NewTestClipExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_clip_inbounds.go b/backend/testbackend/onnx/onnx_test_clip_inbounds.go index 617f8d72..4bf2a9e6 100644 --- a/backend/testbackend/onnx/onnx_test_clip_inbounds.go +++ b/backend/testbackend/onnx/onnx_test_clip_inbounds.go @@ -26,8 +26,8 @@ func NewTestClipInbounds() *testbackend.TestCase { Name: "", OpType: "Clip", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0007db000)(name:"max" type:FLOAT f:5 ), - (*pb.AttributeProto)(0xc0007db100)(name:"min" type:FLOAT f:-5 ) + (*pb.AttributeProto)(0xc000133a00)(name:"max" type:FLOAT f:5 ), + (*pb.AttributeProto)(0xc000133b00)(name:"min" type:FLOAT f:-5 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_clip_inbounds_test.go b/backend/testbackend/onnx/onnx_test_clip_inbounds_test.go new file mode 100644 index 00000000..e98cd46e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_clip_inbounds_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestClipInbounds(t *testing.T) { + mytest := NewTestClipInbounds() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_clip_outbounds.go b/backend/testbackend/onnx/onnx_test_clip_outbounds.go index ace7298e..63fa315a 100644 --- a/backend/testbackend/onnx/onnx_test_clip_outbounds.go +++ b/backend/testbackend/onnx/onnx_test_clip_outbounds.go @@ -26,8 +26,8 @@ func NewTestClipOutbounds() *testbackend.TestCase { Name: "", OpType: "Clip", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001de2300)(name:"max" type:FLOAT f:5 ), - (*pb.AttributeProto)(0xc001de2400)(name:"min" type:FLOAT f:-5 ) + (*pb.AttributeProto)(0xc000118c00)(name:"max" type:FLOAT f:5 ), + (*pb.AttributeProto)(0xc000118d00)(name:"min" type:FLOAT f:-5 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_clip_outbounds_test.go b/backend/testbackend/onnx/onnx_test_clip_outbounds_test.go new file mode 100644 index 00000000..baca6907 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_clip_outbounds_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestClipOutbounds(t *testing.T) { + mytest := NewTestClipOutbounds() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_clip_splitbounds.go b/backend/testbackend/onnx/onnx_test_clip_splitbounds.go index 325d99d1..b9ddbdef 100644 --- a/backend/testbackend/onnx/onnx_test_clip_splitbounds.go +++ b/backend/testbackend/onnx/onnx_test_clip_splitbounds.go @@ -26,8 +26,8 @@ func NewTestClipSplitbounds() *testbackend.TestCase { Name: "", OpType: "Clip", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0007db500)(name:"max" type:FLOAT f:5 ), - (*pb.AttributeProto)(0xc0007db600)(name:"min" type:FLOAT f:-5 ) + (*pb.AttributeProto)(0xc000274000)(name:"max" type:FLOAT f:5 ), + (*pb.AttributeProto)(0xc000274100)(name:"min" type:FLOAT f:-5 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_clip_splitbounds_test.go b/backend/testbackend/onnx/onnx_test_clip_splitbounds_test.go new file mode 100644 index 00000000..cbdd860c --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_clip_splitbounds_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestClipSplitbounds(t *testing.T) { + mytest := NewTestClipSplitbounds() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_clip_test.go b/backend/testbackend/onnx/onnx_test_clip_test.go new file mode 100644 index 00000000..4a586395 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_clip_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestClip(t *testing.T) { + mytest := NewTestClip() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_concat_1d_axis_0.go b/backend/testbackend/onnx/onnx_test_concat_1d_axis_0.go index 3fb95f09..765c7595 100644 --- a/backend/testbackend/onnx/onnx_test_concat_1d_axis_0.go +++ b/backend/testbackend/onnx/onnx_test_concat_1d_axis_0.go @@ -26,7 +26,7 @@ func NewTestConcat1dAxis0() *testbackend.TestCase { Name: "", OpType: "Concat", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc0007dbc00)(name:"axis" type:INT ) + (*pb.AttributeProto)(0xc000119000)(name:"axis" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_concat_1d_axis_0_test.go b/backend/testbackend/onnx/onnx_test_concat_1d_axis_0_test.go new file mode 100644 index 00000000..10062e70 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_concat_1d_axis_0_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConcat1dAxis0(t *testing.T) { + mytest := NewTestConcat1dAxis0() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_concat_2d_axis_0.go b/backend/testbackend/onnx/onnx_test_concat_2d_axis_0.go index 58f83c9a..dc73824c 100644 --- a/backend/testbackend/onnx/onnx_test_concat_2d_axis_0.go +++ b/backend/testbackend/onnx/onnx_test_concat_2d_axis_0.go @@ -26,7 +26,7 @@ func NewTestConcat2dAxis0() *testbackend.TestCase { Name: "", OpType: "Concat", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc001e3c000)(name:"axis" type:INT ) + (*pb.AttributeProto)(0xc000274700)(name:"axis" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_concat_2d_axis_0_test.go b/backend/testbackend/onnx/onnx_test_concat_2d_axis_0_test.go new file mode 100644 index 00000000..3763cf99 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_concat_2d_axis_0_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConcat2dAxis0(t *testing.T) { + mytest := NewTestConcat2dAxis0() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_concat_2d_axis_1.go b/backend/testbackend/onnx/onnx_test_concat_2d_axis_1.go index 82c35629..afc254d9 100644 --- a/backend/testbackend/onnx/onnx_test_concat_2d_axis_1.go +++ b/backend/testbackend/onnx/onnx_test_concat_2d_axis_1.go @@ -26,7 +26,7 @@ func NewTestConcat2dAxis1() *testbackend.TestCase { Name: "", OpType: "Concat", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc001e3c400)(name:"axis" type:INT i:1 ) + (*pb.AttributeProto)(0xc000274800)(name:"axis" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_concat_2d_axis_1_test.go b/backend/testbackend/onnx/onnx_test_concat_2d_axis_1_test.go new file mode 100644 index 00000000..b9916a83 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_concat_2d_axis_1_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConcat2dAxis1(t *testing.T) { + mytest := NewTestConcat2dAxis1() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_concat_3d_axis_0.go b/backend/testbackend/onnx/onnx_test_concat_3d_axis_0.go index 622867b6..d1b41ef2 100644 --- a/backend/testbackend/onnx/onnx_test_concat_3d_axis_0.go +++ b/backend/testbackend/onnx/onnx_test_concat_3d_axis_0.go @@ -26,7 +26,7 @@ func NewTestConcat3dAxis0() *testbackend.TestCase { Name: "", OpType: "Concat", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc001e3c800)(name:"axis" type:INT ) + (*pb.AttributeProto)(0xc000274900)(name:"axis" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_concat_3d_axis_0_test.go b/backend/testbackend/onnx/onnx_test_concat_3d_axis_0_test.go new file mode 100644 index 00000000..cfc25fb8 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_concat_3d_axis_0_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConcat3dAxis0(t *testing.T) { + mytest := NewTestConcat3dAxis0() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_concat_3d_axis_1.go b/backend/testbackend/onnx/onnx_test_concat_3d_axis_1.go index 94ad23b5..159703e6 100644 --- a/backend/testbackend/onnx/onnx_test_concat_3d_axis_1.go +++ b/backend/testbackend/onnx/onnx_test_concat_3d_axis_1.go @@ -26,7 +26,7 @@ func NewTestConcat3dAxis1() *testbackend.TestCase { Name: "", OpType: "Concat", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc001de2900)(name:"axis" type:INT i:1 ) + (*pb.AttributeProto)(0xc0003a0200)(name:"axis" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_concat_3d_axis_1_test.go b/backend/testbackend/onnx/onnx_test_concat_3d_axis_1_test.go new file mode 100644 index 00000000..0c4c5717 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_concat_3d_axis_1_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConcat3dAxis1(t *testing.T) { + mytest := NewTestConcat3dAxis1() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_concat_3d_axis_2.go b/backend/testbackend/onnx/onnx_test_concat_3d_axis_2.go index c3aa5b0c..64deae3b 100644 --- a/backend/testbackend/onnx/onnx_test_concat_3d_axis_2.go +++ b/backend/testbackend/onnx/onnx_test_concat_3d_axis_2.go @@ -26,7 +26,7 @@ func NewTestConcat3dAxis2() *testbackend.TestCase { Name: "", OpType: "Concat", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc001de2a00)(name:"axis" type:INT i:2 ) + (*pb.AttributeProto)(0xc0003a0300)(name:"axis" type:INT i:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_concat_3d_axis_2_test.go b/backend/testbackend/onnx/onnx_test_concat_3d_axis_2_test.go new file mode 100644 index 00000000..373c338c --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_concat_3d_axis_2_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConcat3dAxis2(t *testing.T) { + mytest := NewTestConcat3dAxis2() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_constant.go b/backend/testbackend/onnx/onnx_test_constant.go index 23599935..14b6e5c0 100644 --- a/backend/testbackend/onnx/onnx_test_constant.go +++ b/backend/testbackend/onnx/onnx_test_constant.go @@ -26,7 +26,7 @@ func NewTestConstant() *testbackend.TestCase { Name: "", OpType: "Constant", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc001de2f00)(name:"value" type:TENSOR t: ) + (*pb.AttributeProto)(0xc0003a0900)(name:"value" type:TENSOR t: ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_constant_pad.go b/backend/testbackend/onnx/onnx_test_constant_pad.go index b42b5b4b..07c9e9c7 100644 --- a/backend/testbackend/onnx/onnx_test_constant_pad.go +++ b/backend/testbackend/onnx/onnx_test_constant_pad.go @@ -26,9 +26,9 @@ func NewTestConstantPad() *testbackend.TestCase { Name: "", OpType: "Pad", Attributes: ([]*pb.AttributeProto) (len=3 cap=4) { - (*pb.AttributeProto)(0xc001de3300)(name:"mode" type:STRING s:"constant" ), - (*pb.AttributeProto)(0xc001de3400)(name:"pads" type:INTS ints:0 ints:0 ints:1 ints:3 ints:0 ints:0 ints:2 ints:4 ), - (*pb.AttributeProto)(0xc001de3500)(name:"value" type:FLOAT f:1.2 ) + (*pb.AttributeProto)(0xc0003a0b00)(name:"mode" type:STRING s:"constant" ), + (*pb.AttributeProto)(0xc0003a0c00)(name:"pads" type:INTS ints:0 ints:0 ints:1 ints:3 ints:0 ints:0 ints:2 ints:4 ), + (*pb.AttributeProto)(0xc0003a0d00)(name:"value" type:FLOAT f:1.2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_constant_pad_test.go b/backend/testbackend/onnx/onnx_test_constant_pad_test.go new file mode 100644 index 00000000..513b0e99 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_constant_pad_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConstantPad(t *testing.T) { + mytest := NewTestConstantPad() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_constant_test.go b/backend/testbackend/onnx/onnx_test_constant_test.go new file mode 100644 index 00000000..eb76a3d4 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_constant_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConstant(t *testing.T) { + mytest := NewTestConstant() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_constantofshape_float_ones.go b/backend/testbackend/onnx/onnx_test_constantofshape_float_ones.go index ed866ecf..d242c58e 100644 --- a/backend/testbackend/onnx/onnx_test_constantofshape_float_ones.go +++ b/backend/testbackend/onnx/onnx_test_constantofshape_float_ones.go @@ -11,12 +11,12 @@ func init() { testbackend.Register("ConstantOfShape", "TestConstantofshapeFloatOnes", NewTestConstantofshapeFloatOnes) } -// NewTestConstantofshapeFloatOnes version: 3. +// NewTestConstantofshapeFloatOnes version: 4. func NewTestConstantofshapeFloatOnes() *testbackend.TestCase { return &testbackend.TestCase{ OpType: "ConstantOfShape", Title: "TestConstantofshapeFloatOnes", - ModelB: []byte{0x8, 0x3, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x83, 0x1, 0xa, 0x36, 0xa, 0x1, 0x78, 0x12, 0x1, 0x79, 0x22, 0xf, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x66, 0x53, 0x68, 0x61, 0x70, 0x65, 0x2a, 0x1d, 0xa, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x11, 0x8, 0x1, 0x10, 0x1, 0x22, 0x4, 0x0, 0x0, 0x80, 0x3f, 0x42, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0xa0, 0x1, 0x4, 0x12, 0x1f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x6f, 0x66, 0x73, 0x68, 0x61, 0x70, 0x65, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x6f, 0x6e, 0x65, 0x73, 0x5a, 0xf, 0xa, 0x1, 0x78, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x3, 0x62, 0x17, 0xa, 0x1, 0x79, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x4, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x2, 0x42, 0x2, 0x10, 0x9}, + ModelB: []byte{0x8, 0x4, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x83, 0x1, 0xa, 0x36, 0xa, 0x1, 0x78, 0x12, 0x1, 0x79, 0x22, 0xf, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x66, 0x53, 0x68, 0x61, 0x70, 0x65, 0x2a, 0x1d, 0xa, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x11, 0x8, 0x1, 0x10, 0x1, 0x22, 0x4, 0x0, 0x0, 0x80, 0x3f, 0x42, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0xa0, 0x1, 0x4, 0x12, 0x1f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x6f, 0x66, 0x73, 0x68, 0x61, 0x70, 0x65, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x6f, 0x6e, 0x65, 0x73, 0x5a, 0xf, 0xa, 0x1, 0x78, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x3, 0x62, 0x17, 0xa, 0x1, 0x79, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x4, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x2, 0x42, 0x2, 0x10, 0x9}, /* @@ -26,7 +26,7 @@ func NewTestConstantofshapeFloatOnes() *testbackend.TestCase { Name: "", OpType: "ConstantOfShape", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc001e3cd00)(name:"value" type:TENSOR t: ) + (*pb.AttributeProto)(0xc000132400)(name:"value" type:TENSOR t: ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_constantofshape_float_ones_test.go b/backend/testbackend/onnx/onnx_test_constantofshape_float_ones_test.go new file mode 100644 index 00000000..2606b6ed --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_constantofshape_float_ones_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConstantofshapeFloatOnes(t *testing.T) { + mytest := NewTestConstantofshapeFloatOnes() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_constantofshape_int_zeros.go b/backend/testbackend/onnx/onnx_test_constantofshape_int_zeros.go index ac06349f..bd1c1ce2 100644 --- a/backend/testbackend/onnx/onnx_test_constantofshape_int_zeros.go +++ b/backend/testbackend/onnx/onnx_test_constantofshape_int_zeros.go @@ -11,12 +11,12 @@ func init() { testbackend.Register("ConstantOfShape", "TestConstantofshapeIntZeros", NewTestConstantofshapeIntZeros) } -// NewTestConstantofshapeIntZeros version: 3. +// NewTestConstantofshapeIntZeros version: 4. func NewTestConstantofshapeIntZeros() *testbackend.TestCase { return &testbackend.TestCase{ OpType: "ConstantOfShape", Title: "TestConstantofshapeIntZeros", - ModelB: []byte{0x8, 0x3, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x7b, 0xa, 0x33, 0xa, 0x1, 0x78, 0x12, 0x1, 0x79, 0x22, 0xf, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x66, 0x53, 0x68, 0x61, 0x70, 0x65, 0x2a, 0x1a, 0xa, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0xe, 0x8, 0x1, 0x10, 0x6, 0x2a, 0x1, 0x0, 0x42, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0xa0, 0x1, 0x4, 0x12, 0x1e, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x6f, 0x66, 0x73, 0x68, 0x61, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x73, 0x5a, 0xf, 0xa, 0x1, 0x78, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x2, 0x62, 0x13, 0xa, 0x1, 0x79, 0x12, 0xe, 0xa, 0xc, 0x8, 0x6, 0x12, 0x8, 0xa, 0x2, 0x8, 0xa, 0xa, 0x2, 0x8, 0x6, 0x42, 0x2, 0x10, 0x9}, + ModelB: []byte{0x8, 0x4, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x7b, 0xa, 0x33, 0xa, 0x1, 0x78, 0x12, 0x1, 0x79, 0x22, 0xf, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x66, 0x53, 0x68, 0x61, 0x70, 0x65, 0x2a, 0x1a, 0xa, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0xe, 0x8, 0x1, 0x10, 0x6, 0x2a, 0x1, 0x0, 0x42, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65, 0xa0, 0x1, 0x4, 0x12, 0x1e, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x6f, 0x66, 0x73, 0x68, 0x61, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x73, 0x5a, 0xf, 0xa, 0x1, 0x78, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x2, 0x62, 0x13, 0xa, 0x1, 0x79, 0x12, 0xe, 0xa, 0xc, 0x8, 0x6, 0x12, 0x8, 0xa, 0x2, 0x8, 0xa, 0xa, 0x2, 0x8, 0x6, 0x42, 0x2, 0x10, 0x9}, /* @@ -26,7 +26,7 @@ func NewTestConstantofshapeIntZeros() *testbackend.TestCase { Name: "", OpType: "ConstantOfShape", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc001de3d00)(name:"value" type:TENSOR t: ) + (*pb.AttributeProto)(0xc000132900)(name:"value" type:TENSOR t: ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_constantofshape_int_zeros_test.go b/backend/testbackend/onnx/onnx_test_constantofshape_int_zeros_test.go new file mode 100644 index 00000000..e0244536 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_constantofshape_int_zeros_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConstantofshapeIntZeros(t *testing.T) { + mytest := NewTestConstantofshapeIntZeros() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_conv_with_strides_and_asymmetric_padding.go b/backend/testbackend/onnx/onnx_test_conv_with_strides_and_asymmetric_padding.go index df4dc9b1..4abe9a6c 100644 --- a/backend/testbackend/onnx/onnx_test_conv_with_strides_and_asymmetric_padding.go +++ b/backend/testbackend/onnx/onnx_test_conv_with_strides_and_asymmetric_padding.go @@ -26,9 +26,9 @@ func NewTestConvWithStridesAndAsymmetricPadding() *testbackend.TestCase { Name: "", OpType: "Conv", Attributes: ([]*pb.AttributeProto) (len=3 cap=4) { - (*pb.AttributeProto)(0xc001e3ce00)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc001e3cf00)(name:"pads" type:INTS ints:1 ints:0 ints:1 ints:0 ), - (*pb.AttributeProto)(0xc001e3d000)(name:"strides" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126000)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000126100)(name:"pads" type:INTS ints:1 ints:0 ints:1 ints:0 ), + (*pb.AttributeProto)(0xc000126300)(name:"strides" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_conv_with_strides_and_asymmetric_padding_test.go b/backend/testbackend/onnx/onnx_test_conv_with_strides_and_asymmetric_padding_test.go new file mode 100644 index 00000000..9a22a680 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_conv_with_strides_and_asymmetric_padding_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConvWithStridesAndAsymmetricPadding(t *testing.T) { + mytest := NewTestConvWithStridesAndAsymmetricPadding() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_conv_with_strides_no_padding.go b/backend/testbackend/onnx/onnx_test_conv_with_strides_no_padding.go index ab5afc61..0227dd74 100644 --- a/backend/testbackend/onnx/onnx_test_conv_with_strides_no_padding.go +++ b/backend/testbackend/onnx/onnx_test_conv_with_strides_no_padding.go @@ -26,9 +26,9 @@ func NewTestConvWithStridesNoPadding() *testbackend.TestCase { Name: "", OpType: "Conv", Attributes: ([]*pb.AttributeProto) (len=3 cap=4) { - (*pb.AttributeProto)(0xc001f3c100)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc001f3c200)(name:"pads" type:INTS ints:0 ints:0 ints:0 ints:0 ), - (*pb.AttributeProto)(0xc001f3c300)(name:"strides" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000133400)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000133500)(name:"pads" type:INTS ints:0 ints:0 ints:0 ints:0 ), + (*pb.AttributeProto)(0xc000133600)(name:"strides" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_conv_with_strides_no_padding_test.go b/backend/testbackend/onnx/onnx_test_conv_with_strides_no_padding_test.go new file mode 100644 index 00000000..0af16c21 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_conv_with_strides_no_padding_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConvWithStridesNoPadding(t *testing.T) { + mytest := NewTestConvWithStridesNoPadding() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_conv_with_strides_padding.go b/backend/testbackend/onnx/onnx_test_conv_with_strides_padding.go index 1193b5ab..2c930bf2 100644 --- a/backend/testbackend/onnx/onnx_test_conv_with_strides_padding.go +++ b/backend/testbackend/onnx/onnx_test_conv_with_strides_padding.go @@ -26,9 +26,9 @@ func NewTestConvWithStridesPadding() *testbackend.TestCase { Name: "", OpType: "Conv", Attributes: ([]*pb.AttributeProto) (len=3 cap=4) { - (*pb.AttributeProto)(0xc001e3d600)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc001e3d700)(name:"pads" type:INTS ints:1 ints:1 ints:1 ints:1 ), - (*pb.AttributeProto)(0xc001e3d800)(name:"strides" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126500)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000126600)(name:"pads" type:INTS ints:1 ints:1 ints:1 ints:1 ), + (*pb.AttributeProto)(0xc000126700)(name:"strides" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_conv_with_strides_padding_test.go b/backend/testbackend/onnx/onnx_test_conv_with_strides_padding_test.go new file mode 100644 index 00000000..25237bea --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_conv_with_strides_padding_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConvWithStridesPadding(t *testing.T) { + mytest := NewTestConvWithStridesPadding() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_1d_test.go b/backend/testbackend/onnx/onnx_test_convtranspose_1d_test.go new file mode 100644 index 00000000..d9efb562 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_convtranspose_1d_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConvtranspose1d(t *testing.T) { + mytest := NewTestConvtranspose1d() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_3d_test.go b/backend/testbackend/onnx/onnx_test_convtranspose_3d_test.go new file mode 100644 index 00000000..608cd356 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_convtranspose_3d_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConvtranspose3d(t *testing.T) { + mytest := NewTestConvtranspose3d() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_dilations.go b/backend/testbackend/onnx/onnx_test_convtranspose_dilations.go index aa49a28c..062c08fa 100644 --- a/backend/testbackend/onnx/onnx_test_convtranspose_dilations.go +++ b/backend/testbackend/onnx/onnx_test_convtranspose_dilations.go @@ -26,7 +26,7 @@ func NewTestConvtransposeDilations() *testbackend.TestCase { Name: "", OpType: "ConvTranspose", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc001f3d900)(name:"dilations" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000118d00)(name:"dilations" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_dilations_test.go b/backend/testbackend/onnx/onnx_test_convtranspose_dilations_test.go new file mode 100644 index 00000000..4ee417a4 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_convtranspose_dilations_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConvtransposeDilations(t *testing.T) { + mytest := NewTestConvtransposeDilations() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_kernel_shape.go b/backend/testbackend/onnx/onnx_test_convtranspose_kernel_shape.go index b2998352..21abb6a0 100644 --- a/backend/testbackend/onnx/onnx_test_convtranspose_kernel_shape.go +++ b/backend/testbackend/onnx/onnx_test_convtranspose_kernel_shape.go @@ -26,10 +26,10 @@ func NewTestConvtransposeKernelShape() *testbackend.TestCase { Name: "test", OpType: "ConvTranspose", Attributes: ([]*pb.AttributeProto) (len=4 cap=4) { - (*pb.AttributeProto)(0xc001f3df00)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc002718000)(name:"output_padding" type:INTS ints:1 ints:1 ), - (*pb.AttributeProto)(0xc002718100)(name:"output_shape" type:INTS ints:10 ints:8 ), - (*pb.AttributeProto)(0xc002718200)(name:"strides" type:INTS ints:3 ints:2 ) + (*pb.AttributeProto)(0xc000127b00)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000127c00)(name:"output_padding" type:INTS ints:1 ints:1 ), + (*pb.AttributeProto)(0xc000127d00)(name:"output_shape" type:INTS ints:10 ints:8 ), + (*pb.AttributeProto)(0xc000127e00)(name:"strides" type:INTS ints:3 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_kernel_shape_test.go b/backend/testbackend/onnx/onnx_test_convtranspose_kernel_shape_test.go new file mode 100644 index 00000000..88efd82f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_convtranspose_kernel_shape_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConvtransposeKernelShape(t *testing.T) { + mytest := NewTestConvtransposeKernelShape() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_output_shape.go b/backend/testbackend/onnx/onnx_test_convtranspose_output_shape.go index 9032848b..eb27906c 100644 --- a/backend/testbackend/onnx/onnx_test_convtranspose_output_shape.go +++ b/backend/testbackend/onnx/onnx_test_convtranspose_output_shape.go @@ -26,8 +26,8 @@ func NewTestConvtransposeOutputShape() *testbackend.TestCase { Name: "", OpType: "ConvTranspose", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002728500)(name:"output_shape" type:INTS ints:10 ints:8 ), - (*pb.AttributeProto)(0xc002728600)(name:"strides" type:INTS ints:3 ints:2 ) + (*pb.AttributeProto)(0xc00045a600)(name:"output_shape" type:INTS ints:10 ints:8 ), + (*pb.AttributeProto)(0xc00045a700)(name:"strides" type:INTS ints:3 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_output_shape_test.go b/backend/testbackend/onnx/onnx_test_convtranspose_output_shape_test.go new file mode 100644 index 00000000..c9d1a4ec --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_convtranspose_output_shape_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConvtransposeOutputShape(t *testing.T) { + mytest := NewTestConvtransposeOutputShape() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_pad.go b/backend/testbackend/onnx/onnx_test_convtranspose_pad.go index dabc3d79..e4e9ab51 100644 --- a/backend/testbackend/onnx/onnx_test_convtranspose_pad.go +++ b/backend/testbackend/onnx/onnx_test_convtranspose_pad.go @@ -26,8 +26,8 @@ func NewTestConvtransposePad() *testbackend.TestCase { Name: "", OpType: "ConvTranspose", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002718a00)(name:"output_padding" type:INTS ints:1 ints:1 ), - (*pb.AttributeProto)(0xc002718b00)(name:"strides" type:INTS ints:3 ints:2 ) + (*pb.AttributeProto)(0xc000118e00)(name:"output_padding" type:INTS ints:1 ints:1 ), + (*pb.AttributeProto)(0xc000118f00)(name:"strides" type:INTS ints:3 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_pad_test.go b/backend/testbackend/onnx/onnx_test_convtranspose_pad_test.go new file mode 100644 index 00000000..caf8a96c --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_convtranspose_pad_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConvtransposePad(t *testing.T) { + mytest := NewTestConvtransposePad() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_pads.go b/backend/testbackend/onnx/onnx_test_convtranspose_pads.go index 41bcd337..b326a3f2 100644 --- a/backend/testbackend/onnx/onnx_test_convtranspose_pads.go +++ b/backend/testbackend/onnx/onnx_test_convtranspose_pads.go @@ -26,8 +26,8 @@ func NewTestConvtransposePads() *testbackend.TestCase { Name: "", OpType: "ConvTranspose", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002728700)(name:"pads" type:INTS ints:1 ints:2 ints:1 ints:2 ), - (*pb.AttributeProto)(0xc002728800)(name:"strides" type:INTS ints:3 ints:2 ) + (*pb.AttributeProto)(0xc00045b100)(name:"pads" type:INTS ints:1 ints:2 ints:1 ints:2 ), + (*pb.AttributeProto)(0xc00045b200)(name:"strides" type:INTS ints:3 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_pads_test.go b/backend/testbackend/onnx/onnx_test_convtranspose_pads_test.go new file mode 100644 index 00000000..83365f6b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_convtranspose_pads_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConvtransposePads(t *testing.T) { + mytest := NewTestConvtransposePads() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_test.go b/backend/testbackend/onnx/onnx_test_convtranspose_test.go new file mode 100644 index 00000000..acd50659 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_convtranspose_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConvtranspose(t *testing.T) { + mytest := NewTestConvtranspose() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_with_kernel.go b/backend/testbackend/onnx/onnx_test_convtranspose_with_kernel.go index 36f56388..304ed46c 100644 --- a/backend/testbackend/onnx/onnx_test_convtranspose_with_kernel.go +++ b/backend/testbackend/onnx/onnx_test_convtranspose_with_kernel.go @@ -26,10 +26,10 @@ func NewTestConvtransposeWithKernel() *testbackend.TestCase { Name: "test", OpType: "ConvTranspose", Attributes: ([]*pb.AttributeProto) (len=4 cap=4) { - (*pb.AttributeProto)(0xc002729000)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc002729100)(name:"output_padding" type:INTS ints:1 ints:1 ), - (*pb.AttributeProto)(0xc002729200)(name:"output_shape" type:INTS ints:10 ints:8 ), - (*pb.AttributeProto)(0xc002729300)(name:"strides" type:INTS ints:3 ints:2 ) + (*pb.AttributeProto)(0xc00045bb00)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc00045bc00)(name:"output_padding" type:INTS ints:1 ints:1 ), + (*pb.AttributeProto)(0xc00045bd00)(name:"output_shape" type:INTS ints:10 ints:8 ), + (*pb.AttributeProto)(0xc00045be00)(name:"strides" type:INTS ints:3 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_convtranspose_with_kernel_test.go b/backend/testbackend/onnx/onnx_test_convtranspose_with_kernel_test.go new file mode 100644 index 00000000..d43d10d8 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_convtranspose_with_kernel_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestConvtransposeWithKernel(t *testing.T) { + mytest := NewTestConvtransposeWithKernel() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_cos_example_test.go b/backend/testbackend/onnx/onnx_test_cos_example_test.go new file mode 100644 index 00000000..d4bdc99b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_cos_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestCosExample(t *testing.T) { + mytest := NewTestCosExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_cos_test.go b/backend/testbackend/onnx/onnx_test_cos_test.go new file mode 100644 index 00000000..8e5ba770 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_cos_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestCos(t *testing.T) { + mytest := NewTestCos() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_cosh_example_test.go b/backend/testbackend/onnx/onnx_test_cosh_example_test.go new file mode 100644 index 00000000..b8d0a2f3 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_cosh_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestCoshExample(t *testing.T) { + mytest := NewTestCoshExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_cosh_test.go b/backend/testbackend/onnx/onnx_test_cosh_test.go new file mode 100644 index 00000000..3e7e30dc --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_cosh_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestCosh(t *testing.T) { + mytest := NewTestCosh() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_depthtospace.go b/backend/testbackend/onnx/onnx_test_depthtospace.go index 9d7fd205..1d58f540 100644 --- a/backend/testbackend/onnx/onnx_test_depthtospace.go +++ b/backend/testbackend/onnx/onnx_test_depthtospace.go @@ -26,7 +26,7 @@ func NewTestDepthtospace() *testbackend.TestCase { Name: "", OpType: "DepthToSpace", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc002729e00)(name:"blocksize" type:INT i:2 ) + (*pb.AttributeProto)(0xc000118c00)(name:"blocksize" type:INT i:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_depthtospace_example.go b/backend/testbackend/onnx/onnx_test_depthtospace_example.go index 276b983a..29acb4f3 100644 --- a/backend/testbackend/onnx/onnx_test_depthtospace_example.go +++ b/backend/testbackend/onnx/onnx_test_depthtospace_example.go @@ -26,7 +26,7 @@ func NewTestDepthtospaceExample() *testbackend.TestCase { Name: "", OpType: "DepthToSpace", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc002729f00)(name:"blocksize" type:INT i:2 ) + (*pb.AttributeProto)(0xc000118e00)(name:"blocksize" type:INT i:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_depthtospace_example_test.go b/backend/testbackend/onnx/onnx_test_depthtospace_example_test.go new file mode 100644 index 00000000..88ee0a84 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_depthtospace_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestDepthtospaceExample(t *testing.T) { + mytest := NewTestDepthtospaceExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_depthtospace_test.go b/backend/testbackend/onnx/onnx_test_depthtospace_test.go new file mode 100644 index 00000000..34170e4d --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_depthtospace_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestDepthtospace(t *testing.T) { + mytest := NewTestDepthtospace() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_div_bcast_test.go b/backend/testbackend/onnx/onnx_test_div_bcast_test.go new file mode 100644 index 00000000..0331fcc7 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_div_bcast_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestDivBcast(t *testing.T) { + mytest := NewTestDivBcast() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_div_example_test.go b/backend/testbackend/onnx/onnx_test_div_example_test.go new file mode 100644 index 00000000..7259a08f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_div_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestDivExample(t *testing.T) { + mytest := NewTestDivExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_div_test.go b/backend/testbackend/onnx/onnx_test_div_test.go new file mode 100644 index 00000000..aa137414 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_div_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestDiv(t *testing.T) { + mytest := NewTestDiv() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_dropout_default_test.go b/backend/testbackend/onnx/onnx_test_dropout_default_test.go new file mode 100644 index 00000000..10c98bd0 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_dropout_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestDropoutDefault(t *testing.T) { + mytest := NewTestDropoutDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_dropout_random.go b/backend/testbackend/onnx/onnx_test_dropout_random.go index e056fc98..29836de2 100644 --- a/backend/testbackend/onnx/onnx_test_dropout_random.go +++ b/backend/testbackend/onnx/onnx_test_dropout_random.go @@ -26,7 +26,7 @@ func NewTestDropoutRandom() *testbackend.TestCase { Name: "", OpType: "Dropout", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00283dc00)(name:"ratio" type:FLOAT f:0.2 ) + (*pb.AttributeProto)(0xc000119a00)(name:"ratio" type:FLOAT f:0.2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_dropout_random_test.go b/backend/testbackend/onnx/onnx_test_dropout_random_test.go new file mode 100644 index 00000000..a0919dc2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_dropout_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestDropoutRandom(t *testing.T) { + mytest := NewTestDropoutRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_edge_pad.go b/backend/testbackend/onnx/onnx_test_edge_pad.go index be0f20bc..4c7727c1 100644 --- a/backend/testbackend/onnx/onnx_test_edge_pad.go +++ b/backend/testbackend/onnx/onnx_test_edge_pad.go @@ -26,8 +26,8 @@ func NewTestEdgePad() *testbackend.TestCase { Name: "", OpType: "Pad", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0029ce100)(name:"mode" type:STRING s:"edge" ), - (*pb.AttributeProto)(0xc0029ce200)(name:"pads" type:INTS ints:0 ints:0 ints:1 ints:1 ints:0 ints:0 ints:1 ints:1 ) + (*pb.AttributeProto)(0xc000119f00)(name:"mode" type:STRING s:"edge" ), + (*pb.AttributeProto)(0xc000132300)(name:"pads" type:INTS ints:0 ints:0 ints:1 ints:1 ints:0 ints:0 ints:1 ints:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_edge_pad_test.go b/backend/testbackend/onnx/onnx_test_edge_pad_test.go new file mode 100644 index 00000000..c529e827 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_edge_pad_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestEdgePad(t *testing.T) { + mytest := NewTestEdgePad() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_elu.go b/backend/testbackend/onnx/onnx_test_elu.go index 33e3d851..6eb2e2ae 100644 --- a/backend/testbackend/onnx/onnx_test_elu.go +++ b/backend/testbackend/onnx/onnx_test_elu.go @@ -26,7 +26,7 @@ func NewTestElu() *testbackend.TestCase { Name: "", OpType: "Elu", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc0029ce800)(name:"alpha" type:FLOAT f:2 ) + (*pb.AttributeProto)(0xc000132a00)(name:"alpha" type:FLOAT f:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_elu_default_test.go b/backend/testbackend/onnx/onnx_test_elu_default_test.go new file mode 100644 index 00000000..8afc82d2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_elu_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestEluDefault(t *testing.T) { + mytest := NewTestEluDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_elu_example.go b/backend/testbackend/onnx/onnx_test_elu_example.go index 1d35ddfc..2cf84a63 100644 --- a/backend/testbackend/onnx/onnx_test_elu_example.go +++ b/backend/testbackend/onnx/onnx_test_elu_example.go @@ -26,7 +26,7 @@ func NewTestEluExample() *testbackend.TestCase { Name: "", OpType: "Elu", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc0029cf100)(name:"alpha" type:FLOAT f:2 ) + (*pb.AttributeProto)(0xc000133500)(name:"alpha" type:FLOAT f:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_elu_example_test.go b/backend/testbackend/onnx/onnx_test_elu_example_test.go new file mode 100644 index 00000000..94b7e0dd --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_elu_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestEluExample(t *testing.T) { + mytest := NewTestEluExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_elu_test.go b/backend/testbackend/onnx/onnx_test_elu_test.go new file mode 100644 index 00000000..6c8f80ab --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_elu_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestElu(t *testing.T) { + mytest := NewTestElu() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_erf_test.go b/backend/testbackend/onnx/onnx_test_erf_test.go new file mode 100644 index 00000000..803b54b5 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_erf_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestErf(t *testing.T) { + mytest := NewTestErf() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_exp_example_test.go b/backend/testbackend/onnx/onnx_test_exp_example_test.go new file mode 100644 index 00000000..0a6a473e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_exp_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestExpExample(t *testing.T) { + mytest := NewTestExpExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_exp_test.go b/backend/testbackend/onnx/onnx_test_exp_test.go new file mode 100644 index 00000000..c73f7447 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_exp_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestExp(t *testing.T) { + mytest := NewTestExp() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_expand_dim_changed_test.go b/backend/testbackend/onnx/onnx_test_expand_dim_changed_test.go new file mode 100644 index 00000000..eea9d68a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_expand_dim_changed_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestExpandDimChanged(t *testing.T) { + mytest := NewTestExpandDimChanged() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_expand_dim_unchanged_test.go b/backend/testbackend/onnx/onnx_test_expand_dim_unchanged_test.go new file mode 100644 index 00000000..0aa94cd2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_expand_dim_unchanged_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestExpandDimUnchanged(t *testing.T) { + mytest := NewTestExpandDimUnchanged() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_eyelike_populate_off_main_diagonal.go b/backend/testbackend/onnx/onnx_test_eyelike_populate_off_main_diagonal.go index 668d27df..64ec164b 100644 --- a/backend/testbackend/onnx/onnx_test_eyelike_populate_off_main_diagonal.go +++ b/backend/testbackend/onnx/onnx_test_eyelike_populate_off_main_diagonal.go @@ -26,8 +26,8 @@ func NewTestEyelikePopulateOffMainDiagonal() *testbackend.TestCase { Name: "", OpType: "EyeLike", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011c100)(name:"dtype" type:INT i:1 ), - (*pb.AttributeProto)(0xc00011c500)(name:"k" type:INT i:1 ) + (*pb.AttributeProto)(0xc000119600)(name:"dtype" type:INT i:1 ), + (*pb.AttributeProto)(0xc000119700)(name:"k" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_eyelike_populate_off_main_diagonal_test.go b/backend/testbackend/onnx/onnx_test_eyelike_populate_off_main_diagonal_test.go new file mode 100644 index 00000000..5af5ffad --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_eyelike_populate_off_main_diagonal_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestEyelikePopulateOffMainDiagonal(t *testing.T) { + mytest := NewTestEyelikePopulateOffMainDiagonal() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_eyelike_with_dtype.go b/backend/testbackend/onnx/onnx_test_eyelike_with_dtype.go index 0915bcc9..d7e2b2cf 100644 --- a/backend/testbackend/onnx/onnx_test_eyelike_with_dtype.go +++ b/backend/testbackend/onnx/onnx_test_eyelike_with_dtype.go @@ -26,7 +26,7 @@ func NewTestEyelikeWithDtype() *testbackend.TestCase { Name: "", OpType: "EyeLike", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011cb00)(name:"dtype" type:INT i:11 ) + (*pb.AttributeProto)(0xc000132900)(name:"dtype" type:INT i:11 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_eyelike_with_dtype_test.go b/backend/testbackend/onnx/onnx_test_eyelike_with_dtype_test.go new file mode 100644 index 00000000..212e94c2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_eyelike_with_dtype_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestEyelikeWithDtype(t *testing.T) { + mytest := NewTestEyelikeWithDtype() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_eyelike_without_dtype_test.go b/backend/testbackend/onnx/onnx_test_eyelike_without_dtype_test.go new file mode 100644 index 00000000..331ab8b2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_eyelike_without_dtype_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestEyelikeWithoutDtype(t *testing.T) { + mytest := NewTestEyelikeWithoutDtype() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_flatten_axis0.go b/backend/testbackend/onnx/onnx_test_flatten_axis0.go index 9eba9946..00bcb980 100644 --- a/backend/testbackend/onnx/onnx_test_flatten_axis0.go +++ b/backend/testbackend/onnx/onnx_test_flatten_axis0.go @@ -26,7 +26,7 @@ func NewTestFlattenAxis0() *testbackend.TestCase { Name: "", OpType: "Flatten", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013cf00)(name:"axis" type:INT ) + (*pb.AttributeProto)(0xc000119d00)(name:"axis" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_flatten_axis0_test.go b/backend/testbackend/onnx/onnx_test_flatten_axis0_test.go new file mode 100644 index 00000000..54378332 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_flatten_axis0_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestFlattenAxis0(t *testing.T) { + mytest := NewTestFlattenAxis0() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_flatten_axis1.go b/backend/testbackend/onnx/onnx_test_flatten_axis1.go index 5519dc32..9155f5e7 100644 --- a/backend/testbackend/onnx/onnx_test_flatten_axis1.go +++ b/backend/testbackend/onnx/onnx_test_flatten_axis1.go @@ -26,7 +26,7 @@ func NewTestFlattenAxis1() *testbackend.TestCase { Name: "", OpType: "Flatten", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011d400)(name:"axis" type:INT i:1 ) + (*pb.AttributeProto)(0xc000126400)(name:"axis" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_flatten_axis1_test.go b/backend/testbackend/onnx/onnx_test_flatten_axis1_test.go new file mode 100644 index 00000000..2ea9f5e5 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_flatten_axis1_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestFlattenAxis1(t *testing.T) { + mytest := NewTestFlattenAxis1() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_flatten_axis2.go b/backend/testbackend/onnx/onnx_test_flatten_axis2.go index 794fb853..0a7a141a 100644 --- a/backend/testbackend/onnx/onnx_test_flatten_axis2.go +++ b/backend/testbackend/onnx/onnx_test_flatten_axis2.go @@ -26,7 +26,7 @@ func NewTestFlattenAxis2() *testbackend.TestCase { Name: "", OpType: "Flatten", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013d400)(name:"axis" type:INT i:2 ) + (*pb.AttributeProto)(0xc000126500)(name:"axis" type:INT i:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_flatten_axis2_test.go b/backend/testbackend/onnx/onnx_test_flatten_axis2_test.go new file mode 100644 index 00000000..47626f3f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_flatten_axis2_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestFlattenAxis2(t *testing.T) { + mytest := NewTestFlattenAxis2() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_flatten_axis3.go b/backend/testbackend/onnx/onnx_test_flatten_axis3.go index f330e650..b4f4ff3a 100644 --- a/backend/testbackend/onnx/onnx_test_flatten_axis3.go +++ b/backend/testbackend/onnx/onnx_test_flatten_axis3.go @@ -26,7 +26,7 @@ func NewTestFlattenAxis3() *testbackend.TestCase { Name: "", OpType: "Flatten", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011d900)(name:"axis" type:INT i:3 ) + (*pb.AttributeProto)(0xc000126b00)(name:"axis" type:INT i:3 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_flatten_axis3_test.go b/backend/testbackend/onnx/onnx_test_flatten_axis3_test.go new file mode 100644 index 00000000..63c5a727 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_flatten_axis3_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestFlattenAxis3(t *testing.T) { + mytest := NewTestFlattenAxis3() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_flatten_default_axis_test.go b/backend/testbackend/onnx/onnx_test_flatten_default_axis_test.go new file mode 100644 index 00000000..2eaca6f3 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_flatten_default_axis_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestFlattenDefaultAxis(t *testing.T) { + mytest := NewTestFlattenDefaultAxis() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_floor_example_test.go b/backend/testbackend/onnx/onnx_test_floor_example_test.go new file mode 100644 index 00000000..f69a63d8 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_floor_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestFloorExample(t *testing.T) { + mytest := NewTestFloorExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_floor_test.go b/backend/testbackend/onnx/onnx_test_floor_test.go new file mode 100644 index 00000000..df6fd989 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_floor_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestFloor(t *testing.T) { + mytest := NewTestFloor() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_gather_0.go b/backend/testbackend/onnx/onnx_test_gather_0.go index d294d458..c09262af 100644 --- a/backend/testbackend/onnx/onnx_test_gather_0.go +++ b/backend/testbackend/onnx/onnx_test_gather_0.go @@ -26,7 +26,7 @@ func NewTestGather0() *testbackend.TestCase { Name: "", OpType: "Gather", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013dd00)(name:"axis" type:INT ) + (*pb.AttributeProto)(0xc000133c00)(name:"axis" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_gather_0_test.go b/backend/testbackend/onnx/onnx_test_gather_0_test.go new file mode 100644 index 00000000..ab6f6a4c --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_gather_0_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestGather0(t *testing.T) { + mytest := NewTestGather0() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_gather_1.go b/backend/testbackend/onnx/onnx_test_gather_1.go index b3dfd709..4204f328 100644 --- a/backend/testbackend/onnx/onnx_test_gather_1.go +++ b/backend/testbackend/onnx/onnx_test_gather_1.go @@ -26,7 +26,7 @@ func NewTestGather1() *testbackend.TestCase { Name: "", OpType: "Gather", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013de00)(name:"axis" type:INT i:1 ) + (*pb.AttributeProto)(0xc000118400)(name:"axis" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_gather_1_test.go b/backend/testbackend/onnx/onnx_test_gather_1_test.go new file mode 100644 index 00000000..1683db48 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_gather_1_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestGather1(t *testing.T) { + mytest := NewTestGather1() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_gemm_broadcast.go b/backend/testbackend/onnx/onnx_test_gemm_broadcast.go index dfe95542..d07b816d 100644 --- a/backend/testbackend/onnx/onnx_test_gemm_broadcast.go +++ b/backend/testbackend/onnx/onnx_test_gemm_broadcast.go @@ -26,10 +26,10 @@ func NewTestGemmBroadcast() *testbackend.TestCase { Name: "", OpType: "Gemm", Attributes: ([]*pb.AttributeProto) (len=4 cap=4) { - (*pb.AttributeProto)(0xc00013df00)(name:"alpha" type:FLOAT f:0.5 ), - (*pb.AttributeProto)(0xc002710000)(name:"beta" type:FLOAT f:0.5 ), - (*pb.AttributeProto)(0xc002710100)(name:"transA" type:INT i:1 ), - (*pb.AttributeProto)(0xc002710200)(name:"transB" type:INT i:1 ) + (*pb.AttributeProto)(0xc000118b00)(name:"alpha" type:FLOAT f:0.5 ), + (*pb.AttributeProto)(0xc000118c00)(name:"beta" type:FLOAT f:0.5 ), + (*pb.AttributeProto)(0xc000118d00)(name:"transA" type:INT i:1 ), + (*pb.AttributeProto)(0xc000118e00)(name:"transB" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_gemm_broadcast_test.go b/backend/testbackend/onnx/onnx_test_gemm_broadcast_test.go new file mode 100644 index 00000000..f125516a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_gemm_broadcast_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestGemmBroadcast(t *testing.T) { + mytest := NewTestGemmBroadcast() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_gemm_nobroadcast.go b/backend/testbackend/onnx/onnx_test_gemm_nobroadcast.go index 0d448983..49d10d33 100644 --- a/backend/testbackend/onnx/onnx_test_gemm_nobroadcast.go +++ b/backend/testbackend/onnx/onnx_test_gemm_nobroadcast.go @@ -26,8 +26,8 @@ func NewTestGemmNobroadcast() *testbackend.TestCase { Name: "", OpType: "Gemm", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00027aa00)(name:"alpha" type:FLOAT f:0.5 ), - (*pb.AttributeProto)(0xc00027ab00)(name:"beta" type:FLOAT f:0.5 ) + (*pb.AttributeProto)(0xc000132a00)(name:"alpha" type:FLOAT f:0.5 ), + (*pb.AttributeProto)(0xc000132b00)(name:"beta" type:FLOAT f:0.5 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_gemm_nobroadcast_test.go b/backend/testbackend/onnx/onnx_test_gemm_nobroadcast_test.go new file mode 100644 index 00000000..540043ca --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_gemm_nobroadcast_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestGemmNobroadcast(t *testing.T) { + mytest := NewTestGemmNobroadcast() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_globalaveragepool_precomputed_test.go b/backend/testbackend/onnx/onnx_test_globalaveragepool_precomputed_test.go new file mode 100644 index 00000000..68e2c253 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_globalaveragepool_precomputed_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestGlobalaveragepoolPrecomputed(t *testing.T) { + mytest := NewTestGlobalaveragepoolPrecomputed() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_globalaveragepool_test.go b/backend/testbackend/onnx/onnx_test_globalaveragepool_test.go new file mode 100644 index 00000000..828c16c8 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_globalaveragepool_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestGlobalaveragepool(t *testing.T) { + mytest := NewTestGlobalaveragepool() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_globalmaxpool_precomputed_test.go b/backend/testbackend/onnx/onnx_test_globalmaxpool_precomputed_test.go new file mode 100644 index 00000000..b6ab3d4e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_globalmaxpool_precomputed_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestGlobalmaxpoolPrecomputed(t *testing.T) { + mytest := NewTestGlobalmaxpoolPrecomputed() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_globalmaxpool_test.go b/backend/testbackend/onnx/onnx_test_globalmaxpool_test.go new file mode 100644 index 00000000..06ee0d11 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_globalmaxpool_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestGlobalmaxpool(t *testing.T) { + mytest := NewTestGlobalmaxpool() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_hardmax_axis_0.go b/backend/testbackend/onnx/onnx_test_hardmax_axis_0.go index 85045355..0701e3fd 100644 --- a/backend/testbackend/onnx/onnx_test_hardmax_axis_0.go +++ b/backend/testbackend/onnx/onnx_test_hardmax_axis_0.go @@ -26,7 +26,7 @@ func NewTestHardmaxAxis0() *testbackend.TestCase { Name: "", OpType: "Hardmax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011c500)(name:"axis" type:INT ) + (*pb.AttributeProto)(0xc000126100)(name:"axis" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_hardmax_axis_0_test.go b/backend/testbackend/onnx/onnx_test_hardmax_axis_0_test.go new file mode 100644 index 00000000..7da83f08 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_hardmax_axis_0_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestHardmaxAxis0(t *testing.T) { + mytest := NewTestHardmaxAxis0() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_hardmax_axis_1.go b/backend/testbackend/onnx/onnx_test_hardmax_axis_1.go index bbe94e5c..db7122cc 100644 --- a/backend/testbackend/onnx/onnx_test_hardmax_axis_1.go +++ b/backend/testbackend/onnx/onnx_test_hardmax_axis_1.go @@ -26,7 +26,7 @@ func NewTestHardmaxAxis1() *testbackend.TestCase { Name: "", OpType: "Hardmax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011c600)(name:"axis" type:INT i:1 ) + (*pb.AttributeProto)(0xc000133b00)(name:"axis" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_hardmax_axis_1_test.go b/backend/testbackend/onnx/onnx_test_hardmax_axis_1_test.go new file mode 100644 index 00000000..73913672 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_hardmax_axis_1_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestHardmaxAxis1(t *testing.T) { + mytest := NewTestHardmaxAxis1() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_hardmax_axis_2.go b/backend/testbackend/onnx/onnx_test_hardmax_axis_2.go index 00a8e604..179c3871 100644 --- a/backend/testbackend/onnx/onnx_test_hardmax_axis_2.go +++ b/backend/testbackend/onnx/onnx_test_hardmax_axis_2.go @@ -26,7 +26,7 @@ func NewTestHardmaxAxis2() *testbackend.TestCase { Name: "", OpType: "Hardmax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011cb00)(name:"axis" type:INT i:2 ) + (*pb.AttributeProto)(0xc00023a400)(name:"axis" type:INT i:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_hardmax_axis_2_test.go b/backend/testbackend/onnx/onnx_test_hardmax_axis_2_test.go new file mode 100644 index 00000000..5274d190 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_hardmax_axis_2_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestHardmaxAxis2(t *testing.T) { + mytest := NewTestHardmaxAxis2() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_hardmax_default_axis_test.go b/backend/testbackend/onnx/onnx_test_hardmax_default_axis_test.go new file mode 100644 index 00000000..37a3dd82 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_hardmax_default_axis_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestHardmaxDefaultAxis(t *testing.T) { + mytest := NewTestHardmaxDefaultAxis() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_hardmax_example_test.go b/backend/testbackend/onnx/onnx_test_hardmax_example_test.go new file mode 100644 index 00000000..8df344b9 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_hardmax_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestHardmaxExample(t *testing.T) { + mytest := NewTestHardmaxExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_hardmax_one_hot_test.go b/backend/testbackend/onnx/onnx_test_hardmax_one_hot_test.go new file mode 100644 index 00000000..4ff9a868 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_hardmax_one_hot_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestHardmaxOneHot(t *testing.T) { + mytest := NewTestHardmaxOneHot() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_hardsigmoid.go b/backend/testbackend/onnx/onnx_test_hardsigmoid.go index 3fef4469..9c8ca39d 100644 --- a/backend/testbackend/onnx/onnx_test_hardsigmoid.go +++ b/backend/testbackend/onnx/onnx_test_hardsigmoid.go @@ -26,8 +26,8 @@ func NewTestHardsigmoid() *testbackend.TestCase { Name: "", OpType: "HardSigmoid", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011d200)(name:"alpha" type:FLOAT f:0.5 ), - (*pb.AttributeProto)(0xc00011d300)(name:"beta" type:FLOAT f:0.6 ) + (*pb.AttributeProto)(0xc000127000)(name:"alpha" type:FLOAT f:0.5 ), + (*pb.AttributeProto)(0xc000127100)(name:"beta" type:FLOAT f:0.6 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_hardsigmoid_default_test.go b/backend/testbackend/onnx/onnx_test_hardsigmoid_default_test.go new file mode 100644 index 00000000..a515978e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_hardsigmoid_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestHardsigmoidDefault(t *testing.T) { + mytest := NewTestHardsigmoidDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_hardsigmoid_example.go b/backend/testbackend/onnx/onnx_test_hardsigmoid_example.go index 7a44698b..52401ce3 100644 --- a/backend/testbackend/onnx/onnx_test_hardsigmoid_example.go +++ b/backend/testbackend/onnx/onnx_test_hardsigmoid_example.go @@ -26,8 +26,8 @@ func NewTestHardsigmoidExample() *testbackend.TestCase { Name: "", OpType: "HardSigmoid", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011d900)(name:"alpha" type:FLOAT f:0.5 ), - (*pb.AttributeProto)(0xc00011da00)(name:"beta" type:FLOAT f:0.6 ) + (*pb.AttributeProto)(0xc00023aa00)(name:"alpha" type:FLOAT f:0.5 ), + (*pb.AttributeProto)(0xc00023ab00)(name:"beta" type:FLOAT f:0.6 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_hardsigmoid_example_test.go b/backend/testbackend/onnx/onnx_test_hardsigmoid_example_test.go new file mode 100644 index 00000000..4b95ff42 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_hardsigmoid_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestHardsigmoidExample(t *testing.T) { + mytest := NewTestHardsigmoidExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_hardsigmoid_test.go b/backend/testbackend/onnx/onnx_test_hardsigmoid_test.go new file mode 100644 index 00000000..5a2a7f93 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_hardsigmoid_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestHardsigmoid(t *testing.T) { + mytest := NewTestHardsigmoid() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_identity_test.go b/backend/testbackend/onnx/onnx_test_identity_test.go new file mode 100644 index 00000000..d5c784dd --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_identity_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestIdentity(t *testing.T) { + mytest := NewTestIdentity() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_instancenorm_epsilon.go b/backend/testbackend/onnx/onnx_test_instancenorm_epsilon.go index 1f7234bc..f3701df3 100644 --- a/backend/testbackend/onnx/onnx_test_instancenorm_epsilon.go +++ b/backend/testbackend/onnx/onnx_test_instancenorm_epsilon.go @@ -26,7 +26,7 @@ func NewTestInstancenormEpsilon() *testbackend.TestCase { Name: "", OpType: "InstanceNormalization", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013da00)(name:"epsilon" type:FLOAT f:0.01 ) + (*pb.AttributeProto)(0xc0004ce000)(name:"epsilon" type:FLOAT f:0.01 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_instancenorm_epsilon_test.go b/backend/testbackend/onnx/onnx_test_instancenorm_epsilon_test.go new file mode 100644 index 00000000..d6105fc4 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_instancenorm_epsilon_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestInstancenormEpsilon(t *testing.T) { + mytest := NewTestInstancenormEpsilon() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_instancenorm_example_test.go b/backend/testbackend/onnx/onnx_test_instancenorm_example_test.go new file mode 100644 index 00000000..aa37da8a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_instancenorm_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestInstancenormExample(t *testing.T) { + mytest := NewTestInstancenormExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_leakyrelu.go b/backend/testbackend/onnx/onnx_test_leakyrelu.go index 3de07510..7282eafa 100644 --- a/backend/testbackend/onnx/onnx_test_leakyrelu.go +++ b/backend/testbackend/onnx/onnx_test_leakyrelu.go @@ -26,7 +26,7 @@ func NewTestLeakyrelu() *testbackend.TestCase { Name: "", OpType: "LeakyRelu", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011de00)(name:"alpha" type:FLOAT f:0.1 ) + (*pb.AttributeProto)(0xc0004ce900)(name:"alpha" type:FLOAT f:0.1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_leakyrelu_default_test.go b/backend/testbackend/onnx/onnx_test_leakyrelu_default_test.go new file mode 100644 index 00000000..e5e0a687 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_leakyrelu_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLeakyreluDefault(t *testing.T) { + mytest := NewTestLeakyreluDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_leakyrelu_example.go b/backend/testbackend/onnx/onnx_test_leakyrelu_example.go index 74e22247..f44e3b80 100644 --- a/backend/testbackend/onnx/onnx_test_leakyrelu_example.go +++ b/backend/testbackend/onnx/onnx_test_leakyrelu_example.go @@ -26,7 +26,7 @@ func NewTestLeakyreluExample() *testbackend.TestCase { Name: "", OpType: "LeakyRelu", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00042ab00)(name:"alpha" type:FLOAT f:0.1 ) + (*pb.AttributeProto)(0xc000132700)(name:"alpha" type:FLOAT f:0.1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_leakyrelu_example_test.go b/backend/testbackend/onnx/onnx_test_leakyrelu_example_test.go new file mode 100644 index 00000000..2e8d5eaa --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_leakyrelu_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLeakyreluExample(t *testing.T) { + mytest := NewTestLeakyreluExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_leakyrelu_test.go b/backend/testbackend/onnx/onnx_test_leakyrelu_test.go new file mode 100644 index 00000000..6a38c994 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_leakyrelu_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLeakyrelu(t *testing.T) { + mytest := NewTestLeakyrelu() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_log_example_test.go b/backend/testbackend/onnx/onnx_test_log_example_test.go new file mode 100644 index 00000000..cc32431a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_log_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLogExample(t *testing.T) { + mytest := NewTestLogExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_log_test.go b/backend/testbackend/onnx/onnx_test_log_test.go new file mode 100644 index 00000000..ad5bcb16 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_log_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLog(t *testing.T) { + mytest := NewTestLog() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_logsoftmax_axis_0.go b/backend/testbackend/onnx/onnx_test_logsoftmax_axis_0.go index 35971f17..abcc7d9f 100644 --- a/backend/testbackend/onnx/onnx_test_logsoftmax_axis_0.go +++ b/backend/testbackend/onnx/onnx_test_logsoftmax_axis_0.go @@ -26,7 +26,7 @@ func NewTestLogsoftmaxAxis0() *testbackend.TestCase { Name: "", OpType: "LogSoftmax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc000398500)(name:"axis" type:INT ) + (*pb.AttributeProto)(0xc000132c00)(name:"axis" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_logsoftmax_axis_0_test.go b/backend/testbackend/onnx/onnx_test_logsoftmax_axis_0_test.go new file mode 100644 index 00000000..6fc4921e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_logsoftmax_axis_0_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLogsoftmaxAxis0(t *testing.T) { + mytest := NewTestLogsoftmaxAxis0() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_logsoftmax_axis_1.go b/backend/testbackend/onnx/onnx_test_logsoftmax_axis_1.go index d4e332b6..a8315d25 100644 --- a/backend/testbackend/onnx/onnx_test_logsoftmax_axis_1.go +++ b/backend/testbackend/onnx/onnx_test_logsoftmax_axis_1.go @@ -26,7 +26,7 @@ func NewTestLogsoftmaxAxis1() *testbackend.TestCase { Name: "", OpType: "LogSoftmax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc000398a00)(name:"axis" type:INT i:1 ) + (*pb.AttributeProto)(0xc000133100)(name:"axis" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_logsoftmax_axis_1_test.go b/backend/testbackend/onnx/onnx_test_logsoftmax_axis_1_test.go new file mode 100644 index 00000000..6363f482 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_logsoftmax_axis_1_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLogsoftmaxAxis1(t *testing.T) { + mytest := NewTestLogsoftmaxAxis1() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_logsoftmax_axis_2.go b/backend/testbackend/onnx/onnx_test_logsoftmax_axis_2.go index dcc233b4..5005eff8 100644 --- a/backend/testbackend/onnx/onnx_test_logsoftmax_axis_2.go +++ b/backend/testbackend/onnx/onnx_test_logsoftmax_axis_2.go @@ -26,7 +26,7 @@ func NewTestLogsoftmaxAxis2() *testbackend.TestCase { Name: "", OpType: "LogSoftmax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011c100)(name:"axis" type:INT i:2 ) + (*pb.AttributeProto)(0xc000133300)(name:"axis" type:INT i:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_logsoftmax_axis_2_test.go b/backend/testbackend/onnx/onnx_test_logsoftmax_axis_2_test.go new file mode 100644 index 00000000..7af1bac2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_logsoftmax_axis_2_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLogsoftmaxAxis2(t *testing.T) { + mytest := NewTestLogsoftmaxAxis2() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_logsoftmax_default_axis_test.go b/backend/testbackend/onnx/onnx_test_logsoftmax_default_axis_test.go new file mode 100644 index 00000000..a439f427 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_logsoftmax_default_axis_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLogsoftmaxDefaultAxis(t *testing.T) { + mytest := NewTestLogsoftmaxDefaultAxis() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_logsoftmax_example_1_test.go b/backend/testbackend/onnx/onnx_test_logsoftmax_example_1_test.go new file mode 100644 index 00000000..091bb737 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_logsoftmax_example_1_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLogsoftmaxExample1(t *testing.T) { + mytest := NewTestLogsoftmaxExample1() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_logsoftmax_large_number_test.go b/backend/testbackend/onnx/onnx_test_logsoftmax_large_number_test.go new file mode 100644 index 00000000..dbaed745 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_logsoftmax_large_number_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLogsoftmaxLargeNumber(t *testing.T) { + mytest := NewTestLogsoftmaxLargeNumber() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_lrn.go b/backend/testbackend/onnx/onnx_test_lrn.go index c18d3b6c..b82072cf 100644 --- a/backend/testbackend/onnx/onnx_test_lrn.go +++ b/backend/testbackend/onnx/onnx_test_lrn.go @@ -26,10 +26,10 @@ func NewTestLrn() *testbackend.TestCase { Name: "", OpType: "LRN", Attributes: ([]*pb.AttributeProto) (len=4 cap=4) { - (*pb.AttributeProto)(0xc00013cb00)(name:"alpha" type:FLOAT f:0.0002 ), - (*pb.AttributeProto)(0xc00013cc00)(name:"beta" type:FLOAT f:0.5 ), - (*pb.AttributeProto)(0xc00013cd00)(name:"bias" type:FLOAT f:2 ), - (*pb.AttributeProto)(0xc00013ce00)(name:"size" type:INT i:3 ) + (*pb.AttributeProto)(0xc000133e00)(name:"alpha" type:FLOAT f:0.0002 ), + (*pb.AttributeProto)(0xc000133f00)(name:"beta" type:FLOAT f:0.5 ), + (*pb.AttributeProto)(0xc000126000)(name:"bias" type:FLOAT f:2 ), + (*pb.AttributeProto)(0xc000126100)(name:"size" type:INT i:3 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_lrn_default.go b/backend/testbackend/onnx/onnx_test_lrn_default.go index e4dccb76..fbd79cc1 100644 --- a/backend/testbackend/onnx/onnx_test_lrn_default.go +++ b/backend/testbackend/onnx/onnx_test_lrn_default.go @@ -26,7 +26,7 @@ func NewTestLrnDefault() *testbackend.TestCase { Name: "", OpType: "LRN", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011c900)(name:"size" type:INT i:3 ) + (*pb.AttributeProto)(0xc000118300)(name:"size" type:INT i:3 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_lrn_default_test.go b/backend/testbackend/onnx/onnx_test_lrn_default_test.go new file mode 100644 index 00000000..fb747864 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_lrn_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLrnDefault(t *testing.T) { + mytest := NewTestLrnDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_lrn_test.go b/backend/testbackend/onnx/onnx_test_lrn_test.go new file mode 100644 index 00000000..195c6b04 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_lrn_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestLrn(t *testing.T) { + mytest := NewTestLrn() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_matmul_2d_test.go b/backend/testbackend/onnx/onnx_test_matmul_2d_test.go new file mode 100644 index 00000000..3857c21b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_matmul_2d_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMatmul2d(t *testing.T) { + mytest := NewTestMatmul2d() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_matmul_3d_test.go b/backend/testbackend/onnx/onnx_test_matmul_3d_test.go new file mode 100644 index 00000000..c382e0ef --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_matmul_3d_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMatmul3d(t *testing.T) { + mytest := NewTestMatmul3d() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_matmul_4d_test.go b/backend/testbackend/onnx/onnx_test_matmul_4d_test.go new file mode 100644 index 00000000..532d0cd7 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_matmul_4d_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMatmul4d(t *testing.T) { + mytest := NewTestMatmul4d() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_max_example_test.go b/backend/testbackend/onnx/onnx_test_max_example_test.go new file mode 100644 index 00000000..88496559 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_max_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxExample(t *testing.T) { + mytest := NewTestMaxExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_max_one_input_test.go b/backend/testbackend/onnx/onnx_test_max_one_input_test.go new file mode 100644 index 00000000..6b71b682 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_max_one_input_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxOneInput(t *testing.T) { + mytest := NewTestMaxOneInput() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_max_two_inputs_test.go b/backend/testbackend/onnx/onnx_test_max_two_inputs_test.go new file mode 100644 index 00000000..0e3963c2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_max_two_inputs_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxTwoInputs(t *testing.T) { + mytest := NewTestMaxTwoInputs() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_1d_default.go b/backend/testbackend/onnx/onnx_test_maxpool_1d_default.go index de939d09..ae745aa4 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_1d_default.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_1d_default.go @@ -26,7 +26,7 @@ func NewTestMaxpool1dDefault() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011d700)(name:"kernel_shape" type:INTS ints:2 ) + (*pb.AttributeProto)(0xc000126000)(name:"kernel_shape" type:INTS ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_1d_default_test.go b/backend/testbackend/onnx/onnx_test_maxpool_1d_default_test.go new file mode 100644 index 00000000..728065d9 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_1d_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpool1dDefault(t *testing.T) { + mytest := NewTestMaxpool1dDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_ceil.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_ceil.go index 05822e36..d9b46d3c 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_2d_ceil.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_ceil.go @@ -26,9 +26,9 @@ func NewTestMaxpool2dCeil() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=3 cap=4) { - (*pb.AttributeProto)(0xc00013d200)(name:"ceil_mode" type:INT i:1 ), - (*pb.AttributeProto)(0xc00013d300)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc00013d400)(name:"strides" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000132800)(name:"ceil_mode" type:INT i:1 ), + (*pb.AttributeProto)(0xc000132900)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000132a00)(name:"strides" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_ceil_test.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_ceil_test.go new file mode 100644 index 00000000..beaa6dd8 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_ceil_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpool2dCeil(t *testing.T) { + mytest := NewTestMaxpool2dCeil() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_default.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_default.go index af0a3c80..73458046 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_2d_default.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_default.go @@ -26,7 +26,7 @@ func NewTestMaxpool2dDefault() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011db00)(name:"kernel_shape" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126700)(name:"kernel_shape" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_default_test.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_default_test.go new file mode 100644 index 00000000..2b2e3322 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpool2dDefault(t *testing.T) { + mytest := NewTestMaxpool2dDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_dilations.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_dilations.go index 6306334b..24195c85 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_2d_dilations.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_dilations.go @@ -26,9 +26,9 @@ func NewTestMaxpool2dDilations() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=3 cap=4) { - (*pb.AttributeProto)(0xc00011c100)(name:"dilations" type:INTS ints:2 ints:2 ), - (*pb.AttributeProto)(0xc00011c500)(name:"kernel_shape" type:INTS ints:2 ints:2 ), - (*pb.AttributeProto)(0xc00011c600)(name:"strides" type:INTS ints:1 ints:1 ) + (*pb.AttributeProto)(0xc000126100)(name:"dilations" type:INTS ints:2 ints:2 ), + (*pb.AttributeProto)(0xc000126300)(name:"kernel_shape" type:INTS ints:2 ints:2 ), + (*pb.AttributeProto)(0xc000126400)(name:"strides" type:INTS ints:1 ints:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_dilations_test.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_dilations_test.go new file mode 100644 index 00000000..fb424879 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_dilations_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpool2dDilations(t *testing.T) { + mytest := NewTestMaxpool2dDilations() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_pads.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_pads.go index 8cb26536..bac6ac43 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_2d_pads.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_pads.go @@ -26,8 +26,8 @@ func NewTestMaxpool2dPads() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011c700)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc00011c800)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126600)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000126700)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_pads_test.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_pads_test.go new file mode 100644 index 00000000..a666a580 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_pads_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpool2dPads(t *testing.T) { + mytest := NewTestMaxpool2dPads() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_pads.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_pads.go index 6a066f6e..99be6d36 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_pads.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_pads.go @@ -26,8 +26,8 @@ func NewTestMaxpool2dPrecomputedPads() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011c100)(name:"kernel_shape" type:INTS ints:5 ints:5 ), - (*pb.AttributeProto)(0xc00011c500)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000132300)(name:"kernel_shape" type:INTS ints:5 ints:5 ), + (*pb.AttributeProto)(0xc000132400)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_pads_test.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_pads_test.go new file mode 100644 index 00000000..c414d11b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_pads_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpool2dPrecomputedPads(t *testing.T) { + mytest := NewTestMaxpool2dPrecomputedPads() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_same_upper.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_same_upper.go index c4f2ed27..f118c5cd 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_same_upper.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_same_upper.go @@ -26,9 +26,9 @@ func NewTestMaxpool2dPrecomputedSameUpper() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=3 cap=4) { - (*pb.AttributeProto)(0xc00011c600)(name:"auto_pad" type:STRING s:"SAME_UPPER" ), - (*pb.AttributeProto)(0xc00011c700)(name:"kernel_shape" type:INTS ints:3 ints:3 ), - (*pb.AttributeProto)(0xc00011c800)(name:"strides" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126600)(name:"auto_pad" type:STRING s:"SAME_UPPER" ), + (*pb.AttributeProto)(0xc000126700)(name:"kernel_shape" type:INTS ints:3 ints:3 ), + (*pb.AttributeProto)(0xc000126800)(name:"strides" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_same_upper_test.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_same_upper_test.go new file mode 100644 index 00000000..5817d595 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_same_upper_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpool2dPrecomputedSameUpper(t *testing.T) { + mytest := NewTestMaxpool2dPrecomputedSameUpper() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_strides.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_strides.go index 28ee377b..726edbbc 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_strides.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_strides.go @@ -26,8 +26,8 @@ func NewTestMaxpool2dPrecomputedStrides() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013cd00)(name:"kernel_shape" type:INTS ints:2 ints:2 ), - (*pb.AttributeProto)(0xc00013ce00)(name:"strides" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126a00)(name:"kernel_shape" type:INTS ints:2 ints:2 ), + (*pb.AttributeProto)(0xc000126b00)(name:"strides" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_strides_test.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_strides_test.go new file mode 100644 index 00000000..cc255da2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_precomputed_strides_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpool2dPrecomputedStrides(t *testing.T) { + mytest := NewTestMaxpool2dPrecomputedStrides() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_same_lower.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_same_lower.go index 3a0e9906..9b00e6f7 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_2d_same_lower.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_same_lower.go @@ -26,8 +26,8 @@ func NewTestMaxpool2dSameLower() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011cd00)(name:"auto_pad" type:STRING s:"SAME_LOWER" ), - (*pb.AttributeProto)(0xc00011ce00)(name:"kernel_shape" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000132b00)(name:"auto_pad" type:STRING s:"SAME_LOWER" ), + (*pb.AttributeProto)(0xc000132c00)(name:"kernel_shape" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_same_lower_test.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_same_lower_test.go new file mode 100644 index 00000000..ef8a49eb --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_same_lower_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpool2dSameLower(t *testing.T) { + mytest := NewTestMaxpool2dSameLower() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_same_upper.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_same_upper.go index 31b18ecf..d4d1de9c 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_2d_same_upper.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_same_upper.go @@ -26,8 +26,8 @@ func NewTestMaxpool2dSameUpper() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013c200)(name:"auto_pad" type:STRING s:"SAME_UPPER" ), - (*pb.AttributeProto)(0xc00013c400)(name:"kernel_shape" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126100)(name:"auto_pad" type:STRING s:"SAME_UPPER" ), + (*pb.AttributeProto)(0xc000126300)(name:"kernel_shape" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_same_upper_test.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_same_upper_test.go new file mode 100644 index 00000000..3fb2eed0 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_same_upper_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpool2dSameUpper(t *testing.T) { + mytest := NewTestMaxpool2dSameUpper() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_strides.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_strides.go index 2c042d1e..85fbb458 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_2d_strides.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_strides.go @@ -26,8 +26,8 @@ func NewTestMaxpool2dStrides() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011c100)(name:"kernel_shape" type:INTS ints:5 ints:5 ), - (*pb.AttributeProto)(0xc00011c500)(name:"strides" type:INTS ints:3 ints:3 ) + (*pb.AttributeProto)(0xc000126300)(name:"kernel_shape" type:INTS ints:5 ints:5 ), + (*pb.AttributeProto)(0xc000126400)(name:"strides" type:INTS ints:3 ints:3 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_2d_strides_test.go b/backend/testbackend/onnx/onnx_test_maxpool_2d_strides_test.go new file mode 100644 index 00000000..89450ba3 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_2d_strides_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpool2dStrides(t *testing.T) { + mytest := NewTestMaxpool2dStrides() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_3d_default.go b/backend/testbackend/onnx/onnx_test_maxpool_3d_default.go index 4799599b..cc4a4199 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_3d_default.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_3d_default.go @@ -26,7 +26,7 @@ func NewTestMaxpool3dDefault() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013c200)(name:"kernel_shape" type:INTS ints:2 ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126000)(name:"kernel_shape" type:INTS ints:2 ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_3d_default_test.go b/backend/testbackend/onnx/onnx_test_maxpool_3d_default_test.go new file mode 100644 index 00000000..1d0c17d9 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_3d_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpool3dDefault(t *testing.T) { + mytest := NewTestMaxpool3dDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_pads.go b/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_pads.go index b2216f9e..57424658 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_pads.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_pads.go @@ -26,8 +26,8 @@ func NewTestMaxpoolWithArgmax2dPrecomputedPads() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011c100)(name:"kernel_shape" type:INTS ints:5 ints:5 ), - (*pb.AttributeProto)(0xc00011c500)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126100)(name:"kernel_shape" type:INTS ints:5 ints:5 ), + (*pb.AttributeProto)(0xc000126300)(name:"pads" type:INTS ints:2 ints:2 ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_pads_test.go b/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_pads_test.go new file mode 100644 index 00000000..8346191e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_pads_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpoolWithArgmax2dPrecomputedPads(t *testing.T) { + mytest := NewTestMaxpoolWithArgmax2dPrecomputedPads() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_strides.go b/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_strides.go index d461d451..a0be8182 100644 --- a/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_strides.go +++ b/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_strides.go @@ -26,9 +26,9 @@ func NewTestMaxpoolWithArgmax2dPrecomputedStrides() *testbackend.TestCase { Name: "", OpType: "MaxPool", Attributes: ([]*pb.AttributeProto) (len=3 cap=4) { - (*pb.AttributeProto)(0xc00013ca00)(name:"kernel_shape" type:INTS ints:2 ints:2 ), - (*pb.AttributeProto)(0xc00013cb00)(name:"storage_order" type:INT i:1 ), - (*pb.AttributeProto)(0xc00013cc00)(name:"strides" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126c00)(name:"kernel_shape" type:INTS ints:2 ints:2 ), + (*pb.AttributeProto)(0xc000126d00)(name:"storage_order" type:INT i:1 ), + (*pb.AttributeProto)(0xc000126e00)(name:"strides" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_strides_test.go b/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_strides_test.go new file mode 100644 index 00000000..6758cdee --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxpool_with_argmax_2d_precomputed_strides_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxpoolWithArgmax2dPrecomputedStrides(t *testing.T) { + mytest := NewTestMaxpoolWithArgmax2dPrecomputedStrides() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxunpool_export_with_output_shape.go b/backend/testbackend/onnx/onnx_test_maxunpool_export_with_output_shape.go index b0298f4c..5e41beac 100644 --- a/backend/testbackend/onnx/onnx_test_maxunpool_export_with_output_shape.go +++ b/backend/testbackend/onnx/onnx_test_maxunpool_export_with_output_shape.go @@ -26,8 +26,8 @@ func NewTestMaxunpoolExportWithOutputShape() *testbackend.TestCase { Name: "", OpType: "MaxUnpool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011ca00)(name:"kernel_shape" type:INTS ints:2 ints:2 ), - (*pb.AttributeProto)(0xc00011cb00)(name:"strides" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000132800)(name:"kernel_shape" type:INTS ints:2 ints:2 ), + (*pb.AttributeProto)(0xc000132900)(name:"strides" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxunpool_export_with_output_shape_test.go b/backend/testbackend/onnx/onnx_test_maxunpool_export_with_output_shape_test.go new file mode 100644 index 00000000..1720fa66 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxunpool_export_with_output_shape_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxunpoolExportWithOutputShape(t *testing.T) { + mytest := NewTestMaxunpoolExportWithOutputShape() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_maxunpool_export_without_output_shape.go b/backend/testbackend/onnx/onnx_test_maxunpool_export_without_output_shape.go index dd4cfc6a..e4ab2897 100644 --- a/backend/testbackend/onnx/onnx_test_maxunpool_export_without_output_shape.go +++ b/backend/testbackend/onnx/onnx_test_maxunpool_export_without_output_shape.go @@ -26,8 +26,8 @@ func NewTestMaxunpoolExportWithoutOutputShape() *testbackend.TestCase { Name: "", OpType: "MaxUnpool", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011d100)(name:"kernel_shape" type:INTS ints:2 ints:2 ), - (*pb.AttributeProto)(0xc00011d200)(name:"strides" type:INTS ints:2 ints:2 ) + (*pb.AttributeProto)(0xc000126f00)(name:"kernel_shape" type:INTS ints:2 ints:2 ), + (*pb.AttributeProto)(0xc000127000)(name:"strides" type:INTS ints:2 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_maxunpool_export_without_output_shape_test.go b/backend/testbackend/onnx/onnx_test_maxunpool_export_without_output_shape_test.go new file mode 100644 index 00000000..c90a4502 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_maxunpool_export_without_output_shape_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMaxunpoolExportWithoutOutputShape(t *testing.T) { + mytest := NewTestMaxunpoolExportWithoutOutputShape() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mean_example_test.go b/backend/testbackend/onnx/onnx_test_mean_example_test.go new file mode 100644 index 00000000..101be012 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mean_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMeanExample(t *testing.T) { + mytest := NewTestMeanExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mean_one_input_test.go b/backend/testbackend/onnx/onnx_test_mean_one_input_test.go new file mode 100644 index 00000000..ac37e44f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mean_one_input_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMeanOneInput(t *testing.T) { + mytest := NewTestMeanOneInput() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mean_two_inputs_test.go b/backend/testbackend/onnx/onnx_test_mean_two_inputs_test.go new file mode 100644 index 00000000..b0ad46ae --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mean_two_inputs_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMeanTwoInputs(t *testing.T) { + mytest := NewTestMeanTwoInputs() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_min_example_test.go b/backend/testbackend/onnx/onnx_test_min_example_test.go new file mode 100644 index 00000000..7ded46ac --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_min_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMinExample(t *testing.T) { + mytest := NewTestMinExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_min_one_input_test.go b/backend/testbackend/onnx/onnx_test_min_one_input_test.go new file mode 100644 index 00000000..bd230479 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_min_one_input_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMinOneInput(t *testing.T) { + mytest := NewTestMinOneInput() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_min_two_inputs_test.go b/backend/testbackend/onnx/onnx_test_min_two_inputs_test.go new file mode 100644 index 00000000..ecd6bbef --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_min_two_inputs_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMinTwoInputs(t *testing.T) { + mytest := NewTestMinTwoInputs() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mod_broadcast.go b/backend/testbackend/onnx/onnx_test_mod_broadcast.go new file mode 100644 index 00000000..e011b730 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mod_broadcast.go @@ -0,0 +1,55 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("Mod", "TestModBroadcast", NewTestModBroadcast) +} + +// NewTestModBroadcast version: 5. +func NewTestModBroadcast() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "Mod", + Title: "TestModBroadcast", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x67, 0xa, 0xe, 0xa, 0x1, 0x78, 0xa, 0x1, 0x79, 0x12, 0x1, 0x7a, 0x22, 0x3, 0x4d, 0x6f, 0x64, 0x12, 0x12, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5a, 0x17, 0xa, 0x1, 0x78, 0x12, 0x12, 0xa, 0x10, 0x8, 0x6, 0x12, 0xc, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x2, 0xa, 0x2, 0x8, 0x5, 0x5a, 0xf, 0xa, 0x1, 0x79, 0x12, 0xa, 0xa, 0x8, 0x8, 0x6, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x17, 0xa, 0x1, 0x7a, 0x12, 0x12, 0xa, 0x10, 0x8, 0x6, 0x12, 0xc, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x2, 0xa, 0x2, 0x8, 0x5, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"x", "y"}, + Output: []string{"z"}, + Name: "", + OpType: "Mod", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3, 2, 5), + tensor.WithBacking([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{7}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3, 2, 5), + tensor.WithBacking([]int32{0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 0, 1}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_mod_broadcast_test.go b/backend/testbackend/onnx/onnx_test_mod_broadcast_test.go new file mode 100644 index 00000000..cd625a51 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mod_broadcast_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestModBroadcast(t *testing.T) { + mytest := NewTestModBroadcast() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mod_int64_fmod.go b/backend/testbackend/onnx/onnx_test_mod_int64_fmod.go new file mode 100644 index 00000000..d3ebc560 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mod_int64_fmod.go @@ -0,0 +1,57 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("Mod", "TestModInt64Fmod", NewTestModInt64Fmod) +} + +// NewTestModInt64Fmod version: 5. +func NewTestModInt64Fmod() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "Mod", + Title: "TestModInt64Fmod", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x65, 0xa, 0x1b, 0xa, 0x1, 0x78, 0xa, 0x1, 0x79, 0x12, 0x1, 0x7a, 0x22, 0x3, 0x4d, 0x6f, 0x64, 0x2a, 0xb, 0xa, 0x4, 0x66, 0x6d, 0x6f, 0x64, 0x18, 0x1, 0xa0, 0x1, 0x2, 0x12, 0x13, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x66, 0x6d, 0x6f, 0x64, 0x5a, 0xf, 0xa, 0x1, 0x78, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x5a, 0xf, 0xa, 0x1, 0x79, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x62, 0xf, 0xa, 0x1, 0x7a, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"x", "y"}, + Output: []string{"z"}, + Name: "", + OpType: "Mod", + Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { + (*pb.AttributeProto)(0xc000118700)(name:"fmod" type:INT i:1 ) + } + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]int64{-4, 7, 5, 4, -7, 8}), + ), + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]int64{2, -3, 8, -2, 3, 5}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]int64{0, 1, 5, 0, -1, 3}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_mod_int64_fmod_test.go b/backend/testbackend/onnx/onnx_test_mod_int64_fmod_test.go new file mode 100644 index 00000000..bddf4bc0 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mod_int64_fmod_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestModInt64Fmod(t *testing.T) { + mytest := NewTestModInt64Fmod() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mod_mixed_sign_float32.go b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_float32.go new file mode 100644 index 00000000..d47c6259 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_float32.go @@ -0,0 +1,57 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("Mod", "TestModMixedSignFloat32", NewTestModMixedSignFloat32) +} + +// NewTestModMixedSignFloat32 version: 5. +func NewTestModMixedSignFloat32() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "Mod", + Title: "TestModMixedSignFloat32", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x6d, 0xa, 0x1b, 0xa, 0x1, 0x78, 0xa, 0x1, 0x79, 0x12, 0x1, 0x7a, 0x22, 0x3, 0x4d, 0x6f, 0x64, 0x2a, 0xb, 0xa, 0x4, 0x66, 0x6d, 0x6f, 0x64, 0x18, 0x1, 0xa0, 0x1, 0x2, 0x12, 0x1b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x32, 0x5a, 0xf, 0xa, 0x1, 0x78, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x5a, 0xf, 0xa, 0x1, 0x79, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x62, 0xf, 0xa, 0x1, 0x7a, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"x", "y"}, + Output: []string{"z"}, + Name: "", + OpType: "Mod", + Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { + (*pb.AttributeProto)(0xc000127f00)(name:"fmod" type:INT i:1 ) + } + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]float32{-4.3, 7.2, 5, 4.3, -7.2, 8}), + ), + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]float32{2.1, -3.4, 8, -2.1, 3.4, 5}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]float32{-0.10000038, 0.39999962, 5, 0.10000038, -0.39999962, 3}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_mod_mixed_sign_float32_test.go b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_float32_test.go new file mode 100644 index 00000000..06ea4e76 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_float32_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestModMixedSignFloat32(t *testing.T) { + mytest := NewTestModMixedSignFloat32() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mod_mixed_sign_float64.go b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_float64.go new file mode 100644 index 00000000..a339a30e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_float64.go @@ -0,0 +1,57 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("Mod", "TestModMixedSignFloat64", NewTestModMixedSignFloat64) +} + +// NewTestModMixedSignFloat64 version: 5. +func NewTestModMixedSignFloat64() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "Mod", + Title: "TestModMixedSignFloat64", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x6d, 0xa, 0x1b, 0xa, 0x1, 0x78, 0xa, 0x1, 0x79, 0x12, 0x1, 0x7a, 0x22, 0x3, 0x4d, 0x6f, 0x64, 0x2a, 0xb, 0xa, 0x4, 0x66, 0x6d, 0x6f, 0x64, 0x18, 0x1, 0xa0, 0x1, 0x2, 0x12, 0x1b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x5a, 0xf, 0xa, 0x1, 0x78, 0x12, 0xa, 0xa, 0x8, 0x8, 0xb, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x5a, 0xf, 0xa, 0x1, 0x79, 0x12, 0xa, 0xa, 0x8, 0x8, 0xb, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x62, 0xf, 0xa, 0x1, 0x7a, 0x12, 0xa, 0xa, 0x8, 0x8, 0xb, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"x", "y"}, + Output: []string{"z"}, + Name: "", + OpType: "Mod", + Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { + (*pb.AttributeProto)(0xc00030c400)(name:"fmod" type:INT i:1 ) + } + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]float64{-4.3, 7.2, 5, 4.3, -7.2, 8}), + ), + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]float64{2.1, -3.4, 8, -2.1, 3.4, 5}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]float64{-0.09999999999999964, 0.40000000000000036, 5, 0.09999999999999964, -0.40000000000000036, 3}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_mod_mixed_sign_float64_test.go b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_float64_test.go new file mode 100644 index 00000000..af2ab2e7 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_float64_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestModMixedSignFloat64(t *testing.T) { + mytest := NewTestModMixedSignFloat64() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mod_mixed_sign_int32.go b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_int32.go new file mode 100644 index 00000000..caf111fe --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_int32.go @@ -0,0 +1,55 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("Mod", "TestModMixedSignInt32", NewTestModMixedSignInt32) +} + +// NewTestModMixedSignInt32 version: 5. +func NewTestModMixedSignInt32() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "Mod", + Title: "TestModMixedSignInt32", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x5e, 0xa, 0xe, 0xa, 0x1, 0x78, 0xa, 0x1, 0x79, 0x12, 0x1, 0x7a, 0x22, 0x3, 0x4d, 0x6f, 0x64, 0x12, 0x19, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5a, 0xf, 0xa, 0x1, 0x78, 0x12, 0xa, 0xa, 0x8, 0x8, 0x6, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x5a, 0xf, 0xa, 0x1, 0x79, 0x12, 0xa, 0xa, 0x8, 0x8, 0x6, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x62, 0xf, 0xa, 0x1, 0x7a, 0x12, 0xa, 0xa, 0x8, 0x8, 0x6, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"x", "y"}, + Output: []string{"z"}, + Name: "", + OpType: "Mod", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]int32{-4, 7, 5, 4, -7, 8}), + ), + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]int32{2, -3, 8, -2, 3, 5}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]int32{0, -2, 5, 0, 2, 3}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_mod_mixed_sign_int32_test.go b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_int32_test.go new file mode 100644 index 00000000..b40724db --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_int32_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestModMixedSignInt32(t *testing.T) { + mytest := NewTestModMixedSignInt32() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mod_mixed_sign_int64.go b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_int64.go new file mode 100644 index 00000000..938757ee --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_int64.go @@ -0,0 +1,55 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("Mod", "TestModMixedSignInt64", NewTestModMixedSignInt64) +} + +// NewTestModMixedSignInt64 version: 5. +func NewTestModMixedSignInt64() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "Mod", + Title: "TestModMixedSignInt64", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x5e, 0xa, 0xe, 0xa, 0x1, 0x78, 0xa, 0x1, 0x79, 0x12, 0x1, 0x7a, 0x22, 0x3, 0x4d, 0x6f, 0x64, 0x12, 0x19, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5a, 0xf, 0xa, 0x1, 0x78, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x5a, 0xf, 0xa, 0x1, 0x79, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x62, 0xf, 0xa, 0x1, 0x7a, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x6, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"x", "y"}, + Output: []string{"z"}, + Name: "", + OpType: "Mod", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]int64{-4, 7, 5, 4, -7, 8}), + ), + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]int64{2, -3, 8, -2, 3, 5}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(6), + tensor.WithBacking([]int64{0, -2, 5, 0, 2, 3}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_mod_mixed_sign_int64_test.go b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_int64_test.go new file mode 100644 index 00000000..24b6401b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mod_mixed_sign_int64_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestModMixedSignInt64(t *testing.T) { + mytest := NewTestModMixedSignInt64() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mul_bcast_test.go b/backend/testbackend/onnx/onnx_test_mul_bcast_test.go new file mode 100644 index 00000000..7468d763 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mul_bcast_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMulBcast(t *testing.T) { + mytest := NewTestMulBcast() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mul_example_test.go b/backend/testbackend/onnx/onnx_test_mul_example_test.go new file mode 100644 index 00000000..337655a7 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mul_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMulExample(t *testing.T) { + mytest := NewTestMulExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mul_test.go b/backend/testbackend/onnx/onnx_test_mul_test.go new file mode 100644 index 00000000..16af5223 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mul_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMul(t *testing.T) { + mytest := NewTestMul() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_mvn_test.go b/backend/testbackend/onnx/onnx_test_mvn_test.go new file mode 100644 index 00000000..282f7729 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_mvn_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestMvn(t *testing.T) { + mytest := NewTestMvn() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_neg_example_test.go b/backend/testbackend/onnx/onnx_test_neg_example_test.go new file mode 100644 index 00000000..2c51bc65 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_neg_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestNegExample(t *testing.T) { + mytest := NewTestNegExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_neg_test.go b/backend/testbackend/onnx/onnx_test_neg_test.go new file mode 100644 index 00000000..600e61f0 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_neg_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestNeg(t *testing.T) { + mytest := NewTestNeg() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_center_point_box_format.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_center_point_box_format.go new file mode 100644 index 00000000..13b9ef8d --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_center_point_box_format.go @@ -0,0 +1,72 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("NonMaxSuppression", "TestNonmaxsuppressionCenterPointBoxFormat", NewTestNonmaxsuppressionCenterPointBoxFormat) +} + +// NewTestNonmaxsuppressionCenterPointBoxFormat version: 5. +func NewTestNonmaxsuppressionCenterPointBoxFormat() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "NonMaxSuppression", + Title: "TestNonmaxsuppressionCenterPointBoxFormat", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x81, 0x3, 0xa, 0x89, 0x1, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x11, 0x4e, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x17, 0xa, 0x10, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x1, 0xa0, 0x1, 0x2, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x6d, 0x61, 0x78, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5a, 0x1b, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x6, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x1c, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x6, 0x5a, 0x28, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1b, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1d, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x22, 0xa, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x7, 0x12, 0x8, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x3, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"boxes", "scores", "max_output_boxes_per_class", "iou_threshold", "score_threshold"}, + Output: []string{"selected_indices"}, + Name: "", + OpType: "NonMaxSuppression", + Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { + (*pb.AttributeProto)(0xc000126e00)(name:"center_point_box" type:INT i:1 ) + } + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1, 6, 4), + tensor.WithBacking([]float32{0.5, 0.5, 1, 1, 0.5, 0.6, 1, 1, 0.5, 0.4, 1, 1, 0.5, 10.5, 1, 1, 0.5, 10.6, 1, 1, 0.5, 100.5, 1, 1}), + ), + + tensor.New( + tensor.WithShape(1, 1, 6), + tensor.WithBacking([]float32{0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0.5}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3, 3), + tensor.WithBacking([]int64{0, 0, 3, 0, 0, 0, 0, 0, 5}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_center_point_box_format_test.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_center_point_box_format_test.go new file mode 100644 index 00000000..345659be --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_center_point_box_format_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestNonmaxsuppressionCenterPointBoxFormat(t *testing.T) { + mytest := NewTestNonmaxsuppressionCenterPointBoxFormat() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_flipped_coordinates.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_flipped_coordinates.go new file mode 100644 index 00000000..f5d35f28 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_flipped_coordinates.go @@ -0,0 +1,70 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("NonMaxSuppression", "TestNonmaxsuppressionFlippedCoordinates", NewTestNonmaxsuppressionFlippedCoordinates) +} + +// NewTestNonmaxsuppressionFlippedCoordinates version: 5. +func NewTestNonmaxsuppressionFlippedCoordinates() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "NonMaxSuppression", + Title: "TestNonmaxsuppressionFlippedCoordinates", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xe3, 0x2, 0xa, 0x70, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x11, 0x4e, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x6d, 0x61, 0x78, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x5a, 0x1b, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x6, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x1c, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x6, 0x5a, 0x28, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1b, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1d, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x22, 0xa, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x7, 0x12, 0x8, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x3, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"boxes", "scores", "max_output_boxes_per_class", "iou_threshold", "score_threshold"}, + Output: []string{"selected_indices"}, + Name: "", + OpType: "NonMaxSuppression", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1, 6, 4), + tensor.WithBacking([]float32{1, 1, 0, 0, 0, 0.1, 1, 1.1, 0, 0.9, 1, -0.1, 0, 10, 1, 11, 1, 10.1, 0, 11.1, 1, 101, 0, 100}), + ), + + tensor.New( + tensor.WithShape(1, 1, 6), + tensor.WithBacking([]float32{0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0.5}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3, 3), + tensor.WithBacking([]int64{0, 0, 3, 0, 0, 0, 0, 0, 5}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_flipped_coordinates_test.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_flipped_coordinates_test.go new file mode 100644 index 00000000..ad8c66b6 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_flipped_coordinates_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestNonmaxsuppressionFlippedCoordinates(t *testing.T) { + mytest := NewTestNonmaxsuppressionFlippedCoordinates() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_identical_boxes.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_identical_boxes.go new file mode 100644 index 00000000..eb4b01d8 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_identical_boxes.go @@ -0,0 +1,70 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("NonMaxSuppression", "TestNonmaxsuppressionIdenticalBoxes", NewTestNonmaxsuppressionIdenticalBoxes) +} + +// NewTestNonmaxsuppressionIdenticalBoxes version: 5. +func NewTestNonmaxsuppressionIdenticalBoxes() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "NonMaxSuppression", + Title: "TestNonmaxsuppressionIdenticalBoxes", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xdf, 0x2, 0xa, 0x70, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x11, 0x4e, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x6d, 0x61, 0x78, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5a, 0x1b, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0xa, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x1c, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0xa, 0x5a, 0x28, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1b, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1d, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x22, 0xa, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x7, 0x12, 0x8, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x3, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"boxes", "scores", "max_output_boxes_per_class", "iou_threshold", "score_threshold"}, + Output: []string{"selected_indices"}, + Name: "", + OpType: "NonMaxSuppression", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1, 10, 4), + tensor.WithBacking([]float32{0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1}), + ), + + tensor.New( + tensor.WithShape(1, 1, 10), + tensor.WithBacking([]float32{0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0.5}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1, 3), + tensor.WithBacking([]int64{0, 0, 0}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_identical_boxes_test.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_identical_boxes_test.go new file mode 100644 index 00000000..ffde89de --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_identical_boxes_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestNonmaxsuppressionIdenticalBoxes(t *testing.T) { + mytest := NewTestNonmaxsuppressionIdenticalBoxes() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_limit_output_size.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_limit_output_size.go new file mode 100644 index 00000000..4f9072f4 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_limit_output_size.go @@ -0,0 +1,70 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("NonMaxSuppression", "TestNonmaxsuppressionLimitOutputSize", NewTestNonmaxsuppressionLimitOutputSize) +} + +// NewTestNonmaxsuppressionLimitOutputSize version: 5. +func NewTestNonmaxsuppressionLimitOutputSize() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "NonMaxSuppression", + Title: "TestNonmaxsuppressionLimitOutputSize", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xe1, 0x2, 0xa, 0x70, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x11, 0x4e, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x6d, 0x61, 0x78, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5a, 0x1b, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x6, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x1c, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x6, 0x5a, 0x28, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1b, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1d, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x22, 0xa, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x7, 0x12, 0x8, 0xa, 0x2, 0x8, 0x2, 0xa, 0x2, 0x8, 0x3, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"boxes", "scores", "max_output_boxes_per_class", "iou_threshold", "score_threshold"}, + Output: []string{"selected_indices"}, + Name: "", + OpType: "NonMaxSuppression", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1, 6, 4), + tensor.WithBacking([]float32{0, 0, 1, 1, 0, 0.1, 1, 1.1, 0, -0.1, 1, 0.9, 0, 10, 1, 11, 0, 10.1, 1, 11.1, 0, 100, 1, 101}), + ), + + tensor.New( + tensor.WithShape(1, 1, 6), + tensor.WithBacking([]float32{0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{2}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0.5}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(2, 3), + tensor.WithBacking([]int64{0, 0, 3, 0, 0, 0}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_limit_output_size_test.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_limit_output_size_test.go new file mode 100644 index 00000000..62de2e04 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_limit_output_size_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestNonmaxsuppressionLimitOutputSize(t *testing.T) { + mytest := NewTestNonmaxsuppressionLimitOutputSize() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_single_box.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_single_box.go new file mode 100644 index 00000000..5e88b4d1 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_single_box.go @@ -0,0 +1,70 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("NonMaxSuppression", "TestNonmaxsuppressionSingleBox", NewTestNonmaxsuppressionSingleBox) +} + +// NewTestNonmaxsuppressionSingleBox version: 5. +func NewTestNonmaxsuppressionSingleBox() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "NonMaxSuppression", + Title: "TestNonmaxsuppressionSingleBox", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xda, 0x2, 0xa, 0x70, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x11, 0x4e, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x6d, 0x61, 0x78, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x62, 0x6f, 0x78, 0x5a, 0x1b, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x1c, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x28, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1b, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1d, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x22, 0xa, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x7, 0x12, 0x8, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x3, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"boxes", "scores", "max_output_boxes_per_class", "iou_threshold", "score_threshold"}, + Output: []string{"selected_indices"}, + Name: "", + OpType: "NonMaxSuppression", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1, 1, 4), + tensor.WithBacking([]float32{0, 0, 1, 1}), + ), + + tensor.New( + tensor.WithShape(1, 1, 1), + tensor.WithBacking([]float32{0.9}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0.5}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1, 3), + tensor.WithBacking([]int64{0, 0, 0}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_single_box_test.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_single_box_test.go new file mode 100644 index 00000000..692e4bd7 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_single_box_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestNonmaxsuppressionSingleBox(t *testing.T) { + mytest := NewTestNonmaxsuppressionSingleBox() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU.go new file mode 100644 index 00000000..84aac2e5 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU.go @@ -0,0 +1,70 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("NonMaxSuppression", "TestNonmaxsuppressionSuppressByIOU", NewTestNonmaxsuppressionSuppressByIOU) +} + +// NewTestNonmaxsuppressionSuppressByIOU version: 5. +func NewTestNonmaxsuppressionSuppressByIOU() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "NonMaxSuppression", + Title: "TestNonmaxsuppressionSuppressByIOU", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xdf, 0x2, 0xa, 0x70, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x11, 0x4e, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x6d, 0x61, 0x78, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x49, 0x4f, 0x55, 0x5a, 0x1b, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x6, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x1c, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x6, 0x5a, 0x28, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1b, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1d, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x22, 0xa, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x7, 0x12, 0x8, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x3, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"boxes", "scores", "max_output_boxes_per_class", "iou_threshold", "score_threshold"}, + Output: []string{"selected_indices"}, + Name: "", + OpType: "NonMaxSuppression", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1, 6, 4), + tensor.WithBacking([]float32{0, 0, 1, 1, 0, 0.1, 1, 1.1, 0, -0.1, 1, 0.9, 0, 10, 1, 11, 0, 10.1, 1, 11.1, 0, 100, 1, 101}), + ), + + tensor.New( + tensor.WithShape(1, 1, 6), + tensor.WithBacking([]float32{0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0.5}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3, 3), + tensor.WithBacking([]int64{0, 0, 3, 0, 0, 0, 0, 0, 5}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU_and_scores.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU_and_scores.go new file mode 100644 index 00000000..d57cdd69 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU_and_scores.go @@ -0,0 +1,70 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("NonMaxSuppression", "TestNonmaxsuppressionSuppressByIOUAndScores", NewTestNonmaxsuppressionSuppressByIOUAndScores) +} + +// NewTestNonmaxsuppressionSuppressByIOUAndScores version: 5. +func NewTestNonmaxsuppressionSuppressByIOUAndScores() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "NonMaxSuppression", + Title: "TestNonmaxsuppressionSuppressByIOUAndScores", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xea, 0x2, 0xa, 0x70, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x11, 0x4e, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x6d, 0x61, 0x78, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x49, 0x4f, 0x55, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x5a, 0x1b, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x6, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x1c, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x6, 0x5a, 0x28, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1b, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1d, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x22, 0xa, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x7, 0x12, 0x8, 0xa, 0x2, 0x8, 0x2, 0xa, 0x2, 0x8, 0x3, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"boxes", "scores", "max_output_boxes_per_class", "iou_threshold", "score_threshold"}, + Output: []string{"selected_indices"}, + Name: "", + OpType: "NonMaxSuppression", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1, 6, 4), + tensor.WithBacking([]float32{0, 0, 1, 1, 0, 0.1, 1, 1.1, 0, -0.1, 1, 0.9, 0, 10, 1, 11, 0, 10.1, 1, 11.1, 0, 100, 1, 101}), + ), + + tensor.New( + tensor.WithShape(1, 1, 6), + tensor.WithBacking([]float32{0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0.5}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0.4}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(2, 3), + tensor.WithBacking([]int64{0, 0, 3, 0, 0, 0}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU_and_scores_test.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU_and_scores_test.go new file mode 100644 index 00000000..716e6008 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU_and_scores_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestNonmaxsuppressionSuppressByIOUAndScores(t *testing.T) { + mytest := NewTestNonmaxsuppressionSuppressByIOUAndScores() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU_test.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU_test.go new file mode 100644 index 00000000..dec9231b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_suppress_by_IOU_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestNonmaxsuppressionSuppressByIOU(t *testing.T) { + mytest := NewTestNonmaxsuppressionSuppressByIOU() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_batches.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_batches.go new file mode 100644 index 00000000..84719a28 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_batches.go @@ -0,0 +1,70 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("NonMaxSuppression", "TestNonmaxsuppressionTwoBatches", NewTestNonmaxsuppressionTwoBatches) +} + +// NewTestNonmaxsuppressionTwoBatches version: 5. +func NewTestNonmaxsuppressionTwoBatches() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "NonMaxSuppression", + Title: "TestNonmaxsuppressionTwoBatches", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xdb, 0x2, 0xa, 0x70, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x11, 0x4e, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x6d, 0x61, 0x78, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x77, 0x6f, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x5a, 0x1b, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x2, 0xa, 0x2, 0x8, 0x6, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x1c, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x2, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x6, 0x5a, 0x28, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1b, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1d, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x22, 0xa, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x7, 0x12, 0x8, 0xa, 0x2, 0x8, 0x4, 0xa, 0x2, 0x8, 0x3, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"boxes", "scores", "max_output_boxes_per_class", "iou_threshold", "score_threshold"}, + Output: []string{"selected_indices"}, + Name: "", + OpType: "NonMaxSuppression", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(2, 6, 4), + tensor.WithBacking([]float32{0, 0, 1, 1, 0, 0.1, 1, 1.1, 0, -0.1, 1, 0.9, 0, 10, 1, 11, 0, 10.1, 1, 11.1, 0, 100, 1, 101, 0, 0, 1, 1, 0, 0.1, 1, 1.1, 0, -0.1, 1, 0.9, 0, 10, 1, 11, 0, 10.1, 1, 11.1, 0, 100, 1, 101}), + ), + + tensor.New( + tensor.WithShape(2, 1, 6), + tensor.WithBacking([]float32{0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{2}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0.5}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(4, 3), + tensor.WithBacking([]int64{0, 0, 3, 0, 0, 0, 1, 0, 3, 1, 0, 0}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_batches_test.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_batches_test.go new file mode 100644 index 00000000..23759074 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_batches_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestNonmaxsuppressionTwoBatches(t *testing.T) { + mytest := NewTestNonmaxsuppressionTwoBatches() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_classes.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_classes.go new file mode 100644 index 00000000..b24cff86 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_classes.go @@ -0,0 +1,70 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("NonMaxSuppression", "TestNonmaxsuppressionTwoClasses", NewTestNonmaxsuppressionTwoClasses) +} + +// NewTestNonmaxsuppressionTwoClasses version: 5. +func NewTestNonmaxsuppressionTwoClasses() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "NonMaxSuppression", + Title: "TestNonmaxsuppressionTwoClasses", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xdb, 0x2, 0xa, 0x70, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x11, 0x4e, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x6d, 0x61, 0x78, 0x73, 0x75, 0x70, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x77, 0x6f, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x5a, 0x1b, 0xa, 0x5, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x6, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x1c, 0xa, 0x6, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x2, 0xa, 0x2, 0x8, 0x6, 0x5a, 0x28, 0xa, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1b, 0xa, 0xd, 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x1d, 0xa, 0xf, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x22, 0xa, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x7, 0x12, 0x8, 0xa, 0x2, 0x8, 0x4, 0xa, 0x2, 0x8, 0x3, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"boxes", "scores", "max_output_boxes_per_class", "iou_threshold", "score_threshold"}, + Output: []string{"selected_indices"}, + Name: "", + OpType: "NonMaxSuppression", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1, 6, 4), + tensor.WithBacking([]float32{0, 0, 1, 1, 0, 0.1, 1, 1.1, 0, -0.1, 1, 0.9, 0, 10, 1, 11, 0, 10.1, 1, 11.1, 0, 100, 1, 101}), + ), + + tensor.New( + tensor.WithShape(1, 2, 6), + tensor.WithBacking([]float32{0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{2}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0.5}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(4, 3), + tensor.WithBacking([]int64{0, 0, 3, 0, 0, 0, 0, 1, 3, 0, 1, 0}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_classes_test.go b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_classes_test.go new file mode 100644 index 00000000..ca7c4767 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_nonmaxsuppression_two_classes_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestNonmaxsuppressionTwoClasses(t *testing.T) { + mytest := NewTestNonmaxsuppressionTwoClasses() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_onehot_with_axis.go b/backend/testbackend/onnx/onnx_test_onehot_with_axis.go new file mode 100644 index 00000000..132b84f1 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_onehot_with_axis.go @@ -0,0 +1,62 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("OneHot", "TestOnehotWithAxis", NewTestOnehotWithAxis) +} + +// NewTestOnehotWithAxis version: 3. +func NewTestOnehotWithAxis() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "OneHot", + Title: "TestOnehotWithAxis", + ModelB: []byte{0x8, 0x3, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xa8, 0x1, 0xa, 0x30, 0xa, 0x7, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0xa, 0x5, 0x64, 0x65, 0x70, 0x74, 0x68, 0xa, 0x6, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1, 0x79, 0x22, 0x6, 0x4f, 0x6e, 0x65, 0x48, 0x6f, 0x74, 0x2a, 0xb, 0xa, 0x4, 0x61, 0x78, 0x69, 0x73, 0x18, 0x1, 0xa0, 0x1, 0x2, 0x12, 0x15, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x65, 0x68, 0x6f, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x61, 0x78, 0x69, 0x73, 0x5a, 0x19, 0xa, 0x7, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x1, 0x12, 0x8, 0xa, 0x2, 0x8, 0x2, 0xa, 0x2, 0x8, 0x2, 0x5a, 0x13, 0xa, 0x5, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x14, 0xa, 0x6, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x2, 0x62, 0x17, 0xa, 0x1, 0x79, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x2, 0xa, 0x2, 0x8, 0xa, 0xa, 0x2, 0x8, 0x2, 0x42, 0x2, 0x10, 0x9}, + + /* + + &pb.NodeProto{ + Input: []string{"indices", "depth", "values"}, + Output: []string{"y"}, + Name: "", + OpType: "OneHot", + Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { + (*pb.AttributeProto)(0xc0002e0800)(name:"axis" type:INT i:1 ) + } + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(2, 2), + tensor.WithBacking([]float32{1, 9, 2, 4}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{10}), + ), + + tensor.New( + tensor.WithShape(2), + tensor.WithBacking([]float32{1, 3}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(2, 10, 2), + tensor.WithBacking([]float32{1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_onehot_with_axis_test.go b/backend/testbackend/onnx/onnx_test_onehot_with_axis_test.go new file mode 100644 index 00000000..4bd0f076 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_onehot_with_axis_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestOnehotWithAxis(t *testing.T) { + mytest := NewTestOnehotWithAxis() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_onehot_without_axis.go b/backend/testbackend/onnx/onnx_test_onehot_without_axis.go new file mode 100644 index 00000000..3190cd01 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_onehot_without_axis.go @@ -0,0 +1,60 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("OneHot", "TestOnehotWithoutAxis", NewTestOnehotWithoutAxis) +} + +// NewTestOnehotWithoutAxis version: 3. +func NewTestOnehotWithoutAxis() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "OneHot", + Title: "TestOnehotWithoutAxis", + ModelB: []byte{0x8, 0x3, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x96, 0x1, 0xa, 0x23, 0xa, 0x7, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0xa, 0x5, 0x64, 0x65, 0x70, 0x74, 0x68, 0xa, 0x6, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1, 0x79, 0x22, 0x6, 0x4f, 0x6e, 0x65, 0x48, 0x6f, 0x74, 0x12, 0x18, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x65, 0x68, 0x6f, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x61, 0x78, 0x69, 0x73, 0x5a, 0x15, 0xa, 0x7, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x3, 0x5a, 0x13, 0xa, 0x5, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x14, 0xa, 0x6, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x6, 0x12, 0x4, 0xa, 0x2, 0x8, 0x2, 0x62, 0x13, 0xa, 0x1, 0x79, 0x12, 0xe, 0xa, 0xc, 0x8, 0x6, 0x12, 0x8, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0xc, 0x42, 0x2, 0x10, 0x9}, + + /* + + &pb.NodeProto{ + Input: []string{"indices", "depth", "values"}, + Output: []string{"y"}, + Name: "", + OpType: "OneHot", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3), + tensor.WithBacking([]int64{0, 7, 8}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{12}), + ), + + tensor.New( + tensor.WithShape(2), + tensor.WithBacking([]int32{2, 5}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3, 12), + tensor.WithBacking([]int32{5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_onehot_without_axis_test.go b/backend/testbackend/onnx/onnx_test_onehot_without_axis_test.go new file mode 100644 index 00000000..33da8daf --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_onehot_without_axis_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestOnehotWithoutAxis(t *testing.T) { + mytest := NewTestOnehotWithoutAxis() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_pow_bcast_array_test.go b/backend/testbackend/onnx/onnx_test_pow_bcast_array_test.go new file mode 100644 index 00000000..56738c09 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_pow_bcast_array_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestPowBcastArray(t *testing.T) { + mytest := NewTestPowBcastArray() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_pow_bcast_scalar.go b/backend/testbackend/onnx/onnx_test_pow_bcast_scalar.go new file mode 100644 index 00000000..6056f6df --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_pow_bcast_scalar.go @@ -0,0 +1,55 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("Pow", "TestPowBcastScalar", NewTestPowBcastScalar) +} + +// NewTestPowBcastScalar version: 3. +func NewTestPowBcastScalar() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "Pow", + Title: "TestPowBcastScalar", + ModelB: []byte{0x8, 0x3, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x56, 0xa, 0xe, 0xa, 0x1, 0x78, 0xa, 0x1, 0x79, 0x12, 0x1, 0x7a, 0x22, 0x3, 0x50, 0x6f, 0x77, 0x12, 0x15, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x77, 0x5f, 0x62, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x5a, 0xf, 0xa, 0x1, 0x78, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x3, 0x5a, 0xb, 0xa, 0x1, 0x79, 0x12, 0x6, 0xa, 0x4, 0x8, 0x1, 0x12, 0x0, 0x62, 0xf, 0xa, 0x1, 0x7a, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x3, 0x42, 0x2, 0x10, 0x9}, + + /* + + &pb.NodeProto{ + Input: []string{"x", "y"}, + Output: []string{"z"}, + Name: "", + OpType: "Pow", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3), + tensor.WithBacking([]float32{1, 2, 3}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{2}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3), + tensor.WithBacking([]float32{1, 4, 9}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_pow_bcast_scalar_test.go b/backend/testbackend/onnx/onnx_test_pow_bcast_scalar_test.go new file mode 100644 index 00000000..f53c3fc5 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_pow_bcast_scalar_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestPowBcastScalar(t *testing.T) { + mytest := NewTestPowBcastScalar() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_pow_example_test.go b/backend/testbackend/onnx/onnx_test_pow_example_test.go new file mode 100644 index 00000000..6e6b07a9 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_pow_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestPowExample(t *testing.T) { + mytest := NewTestPowExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_pow_test.go b/backend/testbackend/onnx/onnx_test_pow_test.go new file mode 100644 index 00000000..3acceb5a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_pow_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestPow(t *testing.T) { + mytest := NewTestPow() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_prelu_broadcast_test.go b/backend/testbackend/onnx/onnx_test_prelu_broadcast_test.go new file mode 100644 index 00000000..da19eb9d --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_prelu_broadcast_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestPreluBroadcast(t *testing.T) { + mytest := NewTestPreluBroadcast() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_prelu_example_test.go b/backend/testbackend/onnx/onnx_test_prelu_example_test.go new file mode 100644 index 00000000..4caff899 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_prelu_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestPreluExample(t *testing.T) { + mytest := NewTestPreluExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reciprocal_example_test.go b/backend/testbackend/onnx/onnx_test_reciprocal_example_test.go new file mode 100644 index 00000000..afcf3a5e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reciprocal_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReciprocalExample(t *testing.T) { + mytest := NewTestReciprocalExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reciprocal_test.go b/backend/testbackend/onnx/onnx_test_reciprocal_test.go new file mode 100644 index 00000000..f732afa3 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reciprocal_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReciprocal(t *testing.T) { + mytest := NewTestReciprocal() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_example.go index 19a2fb0f..7f32ddd5 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_example.go @@ -26,7 +26,7 @@ func NewTestReduceL1DefaultAxesKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceL1", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc000337700)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000133f00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_example_test.go new file mode 100644 index 00000000..72e19da3 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceL1DefaultAxesKeepdimsExample(t *testing.T) { + mytest := NewTestReduceL1DefaultAxesKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_random.go index 2377263f..09764f7c 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_random.go @@ -26,7 +26,7 @@ func NewTestReduceL1DefaultAxesKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceL1", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc002710f00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000127a00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_random_test.go new file mode 100644 index 00000000..93bf4579 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_l1_default_axes_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceL1DefaultAxesKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceL1DefaultAxesKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_example.go index f9b90f81..0112a038 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceL1DoNotKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceL1", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc000337b00)(name:"axes" type:INTS ints:2 ), - (*pb.AttributeProto)(0xc000337c00)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc0002e0400)(name:"axes" type:INTS ints:2 ), + (*pb.AttributeProto)(0xc0002e0500)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_example_test.go new file mode 100644 index 00000000..a371aff8 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceL1DoNotKeepdimsExample(t *testing.T) { + mytest := NewTestReduceL1DoNotKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_random.go index 9891b8f4..17afb8e7 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceL1DoNotKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceL1", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001e62100)(name:"axes" type:INTS ints:2 ), - (*pb.AttributeProto)(0xc001e62200)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000118300)(name:"axes" type:INTS ints:2 ), + (*pb.AttributeProto)(0xc000118400)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_random_test.go new file mode 100644 index 00000000..fd5280b7 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_l1_do_not_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceL1DoNotKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceL1DoNotKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_example.go b/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_example.go index ea25390c..cc654632 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_example.go @@ -26,8 +26,8 @@ func NewTestReduceL1KeepDimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceL1", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001e62300)(name:"axes" type:INTS ints:2 ), - (*pb.AttributeProto)(0xc001e62400)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc0002e0e00)(name:"axes" type:INTS ints:2 ), + (*pb.AttributeProto)(0xc0002e0f00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_example_test.go new file mode 100644 index 00000000..9d9a268f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceL1KeepDimsExample(t *testing.T) { + mytest := NewTestReduceL1KeepDimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_random.go b/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_random.go index 4c9522bd..8b4b0290 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_random.go @@ -26,8 +26,8 @@ func NewTestReduceL1KeepDimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceL1", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001e62500)(name:"axes" type:INTS ints:2 ), - (*pb.AttributeProto)(0xc001e62600)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000118500)(name:"axes" type:INTS ints:2 ), + (*pb.AttributeProto)(0xc000118600)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_random_test.go new file mode 100644 index 00000000..09d5c9c3 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_l1_keep_dims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceL1KeepDimsRandom(t *testing.T) { + mytest := NewTestReduceL1KeepDimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_example.go index 5854996a..202b2e64 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_example.go @@ -26,7 +26,7 @@ func NewTestReduceL2DefaultAxesKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceL2", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc002711b00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000118b00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_example_test.go new file mode 100644 index 00000000..b4bb466d --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceL2DefaultAxesKeepdimsExample(t *testing.T) { + mytest := NewTestReduceL2DefaultAxesKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_random.go index 4d02a03f..e1c4a35a 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_random.go @@ -26,7 +26,7 @@ func NewTestReduceL2DefaultAxesKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceL2", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc002711f00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000119000)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_random_test.go new file mode 100644 index 00000000..e35b5c93 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_l2_default_axes_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceL2DefaultAxesKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceL2DefaultAxesKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_example.go index 9ca57c11..6e1d30e4 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceL2DoNotKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceL2", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001e62b00)(name:"axes" type:INTS ints:2 ), - (*pb.AttributeProto)(0xc001e62c00)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc0002e1a00)(name:"axes" type:INTS ints:2 ), + (*pb.AttributeProto)(0xc0002e1b00)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_example_test.go new file mode 100644 index 00000000..0cd4559d --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceL2DoNotKeepdimsExample(t *testing.T) { + mytest := NewTestReduceL2DoNotKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_random.go index c23ed383..834653cf 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceL2DoNotKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceL2", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001e63100)(name:"axes" type:INTS ints:2 ), - (*pb.AttributeProto)(0xc001e63200)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000119600)(name:"axes" type:INTS ints:2 ), + (*pb.AttributeProto)(0xc000119700)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_random_test.go new file mode 100644 index 00000000..1c870ea7 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_l2_do_not_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceL2DoNotKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceL2DoNotKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_example.go b/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_example.go index 3866b0ad..db81f5eb 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_example.go @@ -26,8 +26,8 @@ func NewTestReduceL2KeepDimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceL2", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001e63700)(name:"axes" type:INTS ints:2 ), - (*pb.AttributeProto)(0xc001e63800)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000119800)(name:"axes" type:INTS ints:2 ), + (*pb.AttributeProto)(0xc000119900)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_example_test.go new file mode 100644 index 00000000..2cef321b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceL2KeepDimsExample(t *testing.T) { + mytest := NewTestReduceL2KeepDimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_random.go b/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_random.go index 11b6cb09..ff243c16 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_random.go @@ -26,8 +26,8 @@ func NewTestReduceL2KeepDimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceL2", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001e63d00)(name:"axes" type:INTS ints:2 ), - (*pb.AttributeProto)(0xc001e63e00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000132500)(name:"axes" type:INTS ints:2 ), + (*pb.AttributeProto)(0xc000132600)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_random_test.go new file mode 100644 index 00000000..13da5811 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_l2_keep_dims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceL2KeepDimsRandom(t *testing.T) { + mytest := NewTestReduceL2KeepDimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum.go index 78fa4f70..e9869961 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_log_sum.go +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum.go @@ -26,8 +26,8 @@ func NewTestReduceLogSum() *testbackend.TestCase { Name: "", OpType: "ReduceLogSum", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002952300)(name:"axes" type:INTS ints:2 ints:1 ), - (*pb.AttributeProto)(0xc002952400)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000132700)(name:"axes" type:INTS ints:2 ints:1 ), + (*pb.AttributeProto)(0xc000132800)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_asc_axes.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_asc_axes.go index a9042582..d32a6042 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_log_sum_asc_axes.go +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_asc_axes.go @@ -26,8 +26,8 @@ func NewTestReduceLogSumAscAxes() *testbackend.TestCase { Name: "", OpType: "ReduceLogSum", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0007fe700)(name:"axes" type:INTS ints:0 ints:1 ), - (*pb.AttributeProto)(0xc0007fe800)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000126b00)(name:"axes" type:INTS ints:0 ints:1 ), + (*pb.AttributeProto)(0xc000126c00)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_asc_axes_test.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_asc_axes_test.go new file mode 100644 index 00000000..6a5250d9 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_asc_axes_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceLogSumAscAxes(t *testing.T) { + mytest := NewTestReduceLogSumAscAxes() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_default_test.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_default_test.go new file mode 100644 index 00000000..4e893230 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceLogSumDefault(t *testing.T) { + mytest := NewTestReduceLogSumDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_desc_axes.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_desc_axes.go index 348aef66..bc3aa555 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_log_sum_desc_axes.go +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_desc_axes.go @@ -26,8 +26,8 @@ func NewTestReduceLogSumDescAxes() *testbackend.TestCase { Name: "", OpType: "ReduceLogSum", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002952500)(name:"axes" type:INTS ints:2 ints:1 ), - (*pb.AttributeProto)(0xc002952600)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000127600)(name:"axes" type:INTS ints:2 ints:1 ), + (*pb.AttributeProto)(0xc000127700)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_desc_axes_test.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_desc_axes_test.go new file mode 100644 index 00000000..555e255b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_desc_axes_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceLogSumDescAxes(t *testing.T) { + mytest := NewTestReduceLogSumDescAxes() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_example.go index 34fbf95f..d57d5629 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_example.go @@ -26,7 +26,7 @@ func NewTestReduceLogSumExpDefaultAxesKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceLogSumExp", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc0007ff400)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000127d00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_example_test.go new file mode 100644 index 00000000..5901479a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceLogSumExpDefaultAxesKeepdimsExample(t *testing.T) { + mytest := NewTestReduceLogSumExpDefaultAxesKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_random.go index 28ef3326..f4632246 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_random.go @@ -26,7 +26,7 @@ func NewTestReduceLogSumExpDefaultAxesKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceLogSumExp", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc002952a00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000132d00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_random_test.go new file mode 100644 index 00000000..75b2e00a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_default_axes_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceLogSumExpDefaultAxesKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceLogSumExpDefaultAxesKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_example.go index 7e409838..b6108558 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceLogSumExpDoNotKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceLogSumExp", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0007ff800)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc0007ff900)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000132f00)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000133000)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_example_test.go new file mode 100644 index 00000000..a0e028be --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceLogSumExpDoNotKeepdimsExample(t *testing.T) { + mytest := NewTestReduceLogSumExpDoNotKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_random.go index 0031e414..40b72790 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceLogSumExpDoNotKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceLogSumExp", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002952b00)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc002952c00)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000133600)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000133700)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_random_test.go new file mode 100644 index 00000000..af5ebb62 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_do_not_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceLogSumExpDoNotKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceLogSumExpDoNotKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_example.go index 6b0d2e7b..f36a7bcb 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceLogSumExpKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceLogSumExp", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0007ffe00)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc0007fff00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000133c00)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000133d00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_example_test.go new file mode 100644 index 00000000..077445f1 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceLogSumExpKeepdimsExample(t *testing.T) { + mytest := NewTestReduceLogSumExpKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_random.go index c7808137..b4e064db 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceLogSumExpKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceLogSumExp", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002953100)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc002953200)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000118a00)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000118b00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_random_test.go new file mode 100644 index 00000000..a7ef5716 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_exp_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceLogSumExpKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceLogSumExpKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_log_sum_test.go b/backend/testbackend/onnx/onnx_test_reduce_log_sum_test.go new file mode 100644 index 00000000..0b7b2eec --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_log_sum_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceLogSum(t *testing.T) { + mytest := NewTestReduceLogSum() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdim_example.go b/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdim_example.go index 9b9a030e..cece85ef 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdim_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdim_example.go @@ -26,7 +26,7 @@ func NewTestReduceMaxDefaultAxesKeepdimExample() *testbackend.TestCase { Name: "", OpType: "ReduceMax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc002953300)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000119100)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdim_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdim_example_test.go new file mode 100644 index 00000000..7c429847 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdim_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMaxDefaultAxesKeepdimExample(t *testing.T) { + mytest := NewTestReduceMaxDefaultAxesKeepdimExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdims_random.go index 0f6a799d..1746203e 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdims_random.go @@ -26,7 +26,7 @@ func NewTestReduceMaxDefaultAxesKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceMax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc001eb0b00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000119200)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdims_random_test.go new file mode 100644 index 00000000..87aa8109 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_max_default_axes_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMaxDefaultAxesKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceMaxDefaultAxesKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_example.go index 900ac927..755106d9 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceMaxDoNotKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceMax", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001eb0c00)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc001eb0d00)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000119300)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000119400)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_example_test.go new file mode 100644 index 00000000..30295a15 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMaxDoNotKeepdimsExample(t *testing.T) { + mytest := NewTestReduceMaxDoNotKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_random.go index b3b7c643..b7bdb78f 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceMaxDoNotKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceMax", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001eb0e00)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc001eb0f00)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000234600)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000234700)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_random_test.go new file mode 100644 index 00000000..20854428 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_max_do_not_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMaxDoNotKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceMaxDoNotKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_example.go index a9fd1de1..314f7e9c 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceMaxKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceMax", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001eb1400)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc001eb1500)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000234d00)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000234e00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_example_test.go new file mode 100644 index 00000000..7451e6c1 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMaxKeepdimsExample(t *testing.T) { + mytest := NewTestReduceMaxKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_random.go index 9efe99ab..86242cb4 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceMaxKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceMax", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001eb1a00)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc001eb1b00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000254000)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000254100)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_random_test.go new file mode 100644 index 00000000..6a0e0f10 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_max_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMaxKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceMaxKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_example.go index 0dce7738..0dca8903 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_example.go @@ -26,7 +26,7 @@ func NewTestReduceMeanDefaultAxesKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceMean", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc002953f00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000254200)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_example_test.go new file mode 100644 index 00000000..4d6ead53 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMeanDefaultAxesKeepdimsExample(t *testing.T) { + mytest := NewTestReduceMeanDefaultAxesKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_random.go index 42a138cb..c7ad7834 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_random.go @@ -26,7 +26,7 @@ func NewTestReduceMeanDefaultAxesKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceMean", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc001eb1f00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000254300)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_random_test.go new file mode 100644 index 00000000..2a64cdd2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_mean_default_axes_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMeanDefaultAxesKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceMeanDefaultAxesKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_example.go index 8d2265eb..bc40061a 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceMeanDoNotKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceMean", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002766000)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc002766100)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000254400)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000254500)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_example_test.go new file mode 100644 index 00000000..3208d950 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMeanDoNotKeepdimsExample(t *testing.T) { + mytest := NewTestReduceMeanDoNotKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_random.go index 539da8f7..c314eca6 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceMeanDoNotKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceMean", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002766600)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc002766700)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000254b00)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000254c00)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_random_test.go new file mode 100644 index 00000000..d2964745 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_mean_do_not_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMeanDoNotKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceMeanDoNotKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_example.go index aa3b04f5..42ae9de5 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceMeanKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceMean", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002766800)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc002766900)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000255200)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000255300)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_example_test.go new file mode 100644 index 00000000..2fa306c4 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMeanKeepdimsExample(t *testing.T) { + mytest := NewTestReduceMeanKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_random.go index 033b7d32..c0941d4d 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceMeanKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceMean", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002766a00)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc002766b00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000132800)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000132900)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_random_test.go new file mode 100644 index 00000000..04a94110 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_mean_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMeanKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceMeanKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_example.go index 4d3386d1..eefb23d8 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_example.go @@ -26,7 +26,7 @@ func NewTestReduceMinDefaultAxesKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceMin", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00274cb00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000132a00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_example_test.go new file mode 100644 index 00000000..5d76f356 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMinDefaultAxesKeepdimsExample(t *testing.T) { + mytest := NewTestReduceMinDefaultAxesKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_random.go index 1bc7b729..f599229b 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_random.go @@ -26,7 +26,7 @@ func NewTestReduceMinDefaultAxesKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceMin", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc002767300)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000118c00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_random_test.go new file mode 100644 index 00000000..ffa5af54 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_min_default_axes_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMinDefaultAxesKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceMinDefaultAxesKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_example.go index 72a2360b..16dc46b2 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceMinDoNotKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceMin", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002767400)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc002767500)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000132f00)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000133000)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_example_test.go new file mode 100644 index 00000000..47babd9a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMinDoNotKeepdimsExample(t *testing.T) { + mytest := NewTestReduceMinDoNotKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_random.go index 8d561c77..6e1acb32 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceMinDoNotKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceMin", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00274d300)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc00274d400)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000133100)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000133200)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_random_test.go new file mode 100644 index 00000000..c8891ee5 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_min_do_not_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMinDoNotKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceMinDoNotKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_example.go index 1210cc08..19b6d854 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceMinKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceMin", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002767600)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc002767700)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000133300)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000133400)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_example_test.go new file mode 100644 index 00000000..49c1a29b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMinKeepdimsExample(t *testing.T) { + mytest := NewTestReduceMinKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_random.go index 24ff4447..1b9d5bb3 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceMinKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceMin", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002767c00)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc002767d00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000133500)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000133600)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_random_test.go new file mode 100644 index 00000000..2068ebb2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_min_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceMinKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceMinKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_example.go index f196d915..28a9f69e 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_example.go @@ -26,7 +26,7 @@ func NewTestReduceProdDefaultAxesKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceProd", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc0026dc200)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000133800)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_example_test.go new file mode 100644 index 00000000..a10691b4 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceProdDefaultAxesKeepdimsExample(t *testing.T) { + mytest := NewTestReduceProdDefaultAxesKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_random.go index 1bf07462..e4530749 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_random.go @@ -26,7 +26,7 @@ func NewTestReduceProdDefaultAxesKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceProd", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00274dc00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000133d00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_random_test.go new file mode 100644 index 00000000..0bf617dc --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_prod_default_axes_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceProdDefaultAxesKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceProdDefaultAxesKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_example.go index 081d3bb2..6dfd0d33 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceProdDoNotKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceProd", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0026dc600)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc0026dc700)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000126300)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000126400)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_example_test.go new file mode 100644 index 00000000..4def685f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceProdDoNotKeepdimsExample(t *testing.T) { + mytest := NewTestReduceProdDoNotKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_random.go index 960a79c1..dc445ad5 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceProdDoNotKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceProd", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0026dcc00)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc0026dcd00)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc0003e8500)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc0003e8600)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_random_test.go new file mode 100644 index 00000000..d296ec54 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_prod_do_not_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceProdDoNotKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceProdDoNotKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_example.go index ca276f73..ab64762f 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceProdKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceProd", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc000266100)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc000266200)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000126500)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000126600)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_example_test.go new file mode 100644 index 00000000..44c01517 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceProdKeepdimsExample(t *testing.T) { + mytest := NewTestReduceProdKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_random.go index fe4a0d8c..407667be 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceProdKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceProd", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0026dce00)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc0026dcf00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc0003e9100)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc0003e9200)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_random_test.go new file mode 100644 index 00000000..914265f5 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_prod_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceProdKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceProdKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_example.go index 88210660..1d3bc87d 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_example.go @@ -26,7 +26,7 @@ func NewTestReduceSumDefaultAxesKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceSum", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc0026dd000)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000126c00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_example_test.go new file mode 100644 index 00000000..250d06c4 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceSumDefaultAxesKeepdimsExample(t *testing.T) { + mytest := NewTestReduceSumDefaultAxesKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_random.go index 92672c94..995274e7 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_random.go @@ -26,7 +26,7 @@ func NewTestReduceSumDefaultAxesKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceSum", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc000266e00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc0003e9300)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_random_test.go new file mode 100644 index 00000000..6527fbad --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_default_axes_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceSumDefaultAxesKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceSumDefaultAxesKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_example.go index 3b37dfae..79f4a459 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceSumDoNotKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceSum", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0026dd100)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc0026dd200)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000127100)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000127200)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_example_test.go new file mode 100644 index 00000000..3497c733 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceSumDoNotKeepdimsExample(t *testing.T) { + mytest := NewTestReduceSumDoNotKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_random.go index 71c5e67e..9566f45c 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceSumDoNotKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceSum", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc000267600)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc000267700)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000127300)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000127400)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_random_test.go new file mode 100644 index 00000000..38c3a920 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_do_not_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceSumDoNotKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceSumDoNotKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_example.go index 8da1010e..50fe5448 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceSumKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceSum", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0026dd700)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc0026dd800)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc0001f0200)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc0001f0300)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_example_test.go new file mode 100644 index 00000000..667d97fc --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceSumKeepdimsExample(t *testing.T) { + mytest := NewTestReduceSumKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_random.go index 1838dbcc..4271c57a 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceSumKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceSum", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc000267c00)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc000267d00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000127500)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000127600)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_random_test.go new file mode 100644 index 00000000..1b515573 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceSumKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceSumKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_example.go index 08f1bc74..b3e89eee 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_example.go @@ -26,7 +26,7 @@ func NewTestReduceSumSquareDefaultAxesKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceSumSquare", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc000267e00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc0001f0e00)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_example_test.go new file mode 100644 index 00000000..ebb61105 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceSumSquareDefaultAxesKeepdimsExample(t *testing.T) { + mytest := NewTestReduceSumSquareDefaultAxesKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_random.go index 1e9387bb..bc06bbe1 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_random.go @@ -26,7 +26,7 @@ func NewTestReduceSumSquareDefaultAxesKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceSumSquare", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc0026ddd00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc0001f1300)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_random_test.go new file mode 100644 index 00000000..351af1d9 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_square_default_axes_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceSumSquareDefaultAxesKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceSumSquareDefaultAxesKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_example.go index 11ca0353..04a32091 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceSumSquareDoNotKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceSumSquare", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc002938200)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc002938300)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc000127700)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000127800)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_example_test.go new file mode 100644 index 00000000..757e22c7 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceSumSquareDoNotKeepdimsExample(t *testing.T) { + mytest := NewTestReduceSumSquareDoNotKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_random.go index f5bf2c52..a6cca64b 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceSumSquareDoNotKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceSumSquare", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013c200)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc00013c400)(name:"keepdims" type:INT ) + (*pb.AttributeProto)(0xc0001f1d00)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc0001f1e00)(name:"keepdims" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_random_test.go new file mode 100644 index 00000000..78617a1b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_square_do_not_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceSumSquareDoNotKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceSumSquareDoNotKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_example.go b/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_example.go index 2e8a68f4..5b9843f0 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_example.go +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_example.go @@ -26,8 +26,8 @@ func NewTestReduceSumSquareKeepdimsExample() *testbackend.TestCase { Name: "", OpType: "ReduceSumSquare", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013c900)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc00013ca00)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000118300)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000118400)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_example_test.go b/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_example_test.go new file mode 100644 index 00000000..c7ad9db6 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceSumSquareKeepdimsExample(t *testing.T) { + mytest := NewTestReduceSumSquareKeepdimsExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_random.go b/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_random.go index 1a797920..133dd39b 100644 --- a/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_random.go +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_random.go @@ -26,8 +26,8 @@ func NewTestReduceSumSquareKeepdimsRandom() *testbackend.TestCase { Name: "", OpType: "ReduceSumSquare", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013cf00)(name:"axes" type:INTS ints:1 ), - (*pb.AttributeProto)(0xc00013d000)(name:"keepdims" type:INT i:1 ) + (*pb.AttributeProto)(0xc000132600)(name:"axes" type:INTS ints:1 ), + (*pb.AttributeProto)(0xc000132700)(name:"keepdims" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_random_test.go b/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_random_test.go new file mode 100644 index 00000000..f83f6b2d --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reduce_sum_square_keepdims_random_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReduceSumSquareKeepdimsRandom(t *testing.T) { + mytest := NewTestReduceSumSquareKeepdimsRandom() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reflect_pad.go b/backend/testbackend/onnx/onnx_test_reflect_pad.go index adbb31ae..d2f55bab 100644 --- a/backend/testbackend/onnx/onnx_test_reflect_pad.go +++ b/backend/testbackend/onnx/onnx_test_reflect_pad.go @@ -26,8 +26,8 @@ func NewTestReflectPad() *testbackend.TestCase { Name: "", OpType: "Pad", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc001ee6600)(name:"mode" type:STRING s:"reflect" ), - (*pb.AttributeProto)(0xc001ee6700)(name:"pads" type:INTS ints:0 ints:0 ints:1 ints:1 ints:0 ints:0 ints:1 ints:1 ) + (*pb.AttributeProto)(0xc000132d00)(name:"mode" type:STRING s:"reflect" ), + (*pb.AttributeProto)(0xc000132e00)(name:"pads" type:INTS ints:0 ints:0 ints:1 ints:1 ints:0 ints:0 ints:1 ints:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_reflect_pad_test.go b/backend/testbackend/onnx/onnx_test_reflect_pad_test.go new file mode 100644 index 00000000..94d473c3 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reflect_pad_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReflectPad(t *testing.T) { + mytest := NewTestReflectPad() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_relu_test.go b/backend/testbackend/onnx/onnx_test_relu_test.go new file mode 100644 index 00000000..cdad9478 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_relu_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestRelu(t *testing.T) { + mytest := NewTestRelu() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reshape_extended_dims_test.go b/backend/testbackend/onnx/onnx_test_reshape_extended_dims_test.go new file mode 100644 index 00000000..77a16a4f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reshape_extended_dims_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReshapeExtendedDims(t *testing.T) { + mytest := NewTestReshapeExtendedDims() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reshape_negative_dim_test.go b/backend/testbackend/onnx/onnx_test_reshape_negative_dim_test.go new file mode 100644 index 00000000..2a9ff183 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reshape_negative_dim_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReshapeNegativeDim(t *testing.T) { + mytest := NewTestReshapeNegativeDim() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reshape_one_dim.go b/backend/testbackend/onnx/onnx_test_reshape_one_dim.go new file mode 100644 index 00000000..5e7640c2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reshape_one_dim.go @@ -0,0 +1,55 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("Reshape", "TestReshapeOneDim", NewTestReshapeOneDim) +} + +// NewTestReshapeOneDim version: 3. +func NewTestReshapeOneDim() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "Reshape", + Title: "TestReshapeOneDim", + ModelB: []byte{0x8, 0x3, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x81, 0x1, 0xa, 0x20, 0xa, 0x4, 0x64, 0x61, 0x74, 0x61, 0xa, 0x5, 0x73, 0x68, 0x61, 0x70, 0x65, 0x12, 0x8, 0x72, 0x65, 0x73, 0x68, 0x61, 0x70, 0x65, 0x64, 0x22, 0x7, 0x52, 0x65, 0x73, 0x68, 0x61, 0x70, 0x65, 0x12, 0x14, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x68, 0x61, 0x70, 0x65, 0x5f, 0x6f, 0x6e, 0x65, 0x5f, 0x64, 0x69, 0x6d, 0x5a, 0x1a, 0xa, 0x4, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x2, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x13, 0xa, 0x5, 0x73, 0x68, 0x61, 0x70, 0x65, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x16, 0xa, 0x8, 0x72, 0x65, 0x73, 0x68, 0x61, 0x70, 0x65, 0x64, 0x12, 0xa, 0xa, 0x8, 0x8, 0x1, 0x12, 0x4, 0xa, 0x2, 0x8, 0x18, 0x42, 0x2, 0x10, 0x9}, + + /* + + &pb.NodeProto{ + Input: []string{"data", "shape"}, + Output: []string{"reshaped"}, + Name: "", + OpType: "Reshape", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(2, 3, 4), + tensor.WithBacking([]float32{0.5488135, 0.71518934, 0.60276335, 0.5448832, 0.4236548, 0.6458941, 0.4375872, 0.891773, 0.96366274, 0.3834415, 0.79172504, 0.5288949, 0.56804454, 0.92559665, 0.071036056, 0.0871293, 0.020218397, 0.83261985, 0.77815676, 0.87001216, 0.9786183, 0.7991586, 0.46147937, 0.7805292}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{24}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(24), + tensor.WithBacking([]float32{0.5488135, 0.71518934, 0.60276335, 0.5448832, 0.4236548, 0.6458941, 0.4375872, 0.891773, 0.96366274, 0.3834415, 0.79172504, 0.5288949, 0.56804454, 0.92559665, 0.071036056, 0.0871293, 0.020218397, 0.83261985, 0.77815676, 0.87001216, 0.9786183, 0.7991586, 0.46147937, 0.7805292}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_reshape_one_dim_test.go b/backend/testbackend/onnx/onnx_test_reshape_one_dim_test.go new file mode 100644 index 00000000..d48492e1 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reshape_one_dim_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReshapeOneDim(t *testing.T) { + mytest := NewTestReshapeOneDim() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reshape_reduced_dims_test.go b/backend/testbackend/onnx/onnx_test_reshape_reduced_dims_test.go new file mode 100644 index 00000000..465a8f29 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reshape_reduced_dims_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReshapeReducedDims(t *testing.T) { + mytest := NewTestReshapeReducedDims() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reshape_reordered_dims_test.go b/backend/testbackend/onnx/onnx_test_reshape_reordered_dims_test.go new file mode 100644 index 00000000..779c23a9 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reshape_reordered_dims_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReshapeReorderedDims(t *testing.T) { + mytest := NewTestReshapeReorderedDims() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_resize_downsample_linear.go b/backend/testbackend/onnx/onnx_test_resize_downsample_linear.go index bb364437..0015e98f 100644 --- a/backend/testbackend/onnx/onnx_test_resize_downsample_linear.go +++ b/backend/testbackend/onnx/onnx_test_resize_downsample_linear.go @@ -26,7 +26,7 @@ func NewTestResizeDownsampleLinear() *testbackend.TestCase { Name: "", OpType: "Resize", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011c100)(name:"mode" type:STRING s:"linear" ) + (*pb.AttributeProto)(0xc000119400)(name:"mode" type:STRING s:"linear" ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_resize_downsample_linear_test.go b/backend/testbackend/onnx/onnx_test_resize_downsample_linear_test.go new file mode 100644 index 00000000..1c0d8376 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_resize_downsample_linear_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestResizeDownsampleLinear(t *testing.T) { + mytest := NewTestResizeDownsampleLinear() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_resize_downsample_nearest.go b/backend/testbackend/onnx/onnx_test_resize_downsample_nearest.go index 7fb1c113..968debe5 100644 --- a/backend/testbackend/onnx/onnx_test_resize_downsample_nearest.go +++ b/backend/testbackend/onnx/onnx_test_resize_downsample_nearest.go @@ -26,7 +26,7 @@ func NewTestResizeDownsampleNearest() *testbackend.TestCase { Name: "", OpType: "Resize", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011c800)(name:"mode" type:STRING s:"nearest" ) + (*pb.AttributeProto)(0xc000127200)(name:"mode" type:STRING s:"nearest" ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_resize_downsample_nearest_test.go b/backend/testbackend/onnx/onnx_test_resize_downsample_nearest_test.go new file mode 100644 index 00000000..3c115d10 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_resize_downsample_nearest_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestResizeDownsampleNearest(t *testing.T) { + mytest := NewTestResizeDownsampleNearest() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_resize_nearest.go b/backend/testbackend/onnx/onnx_test_resize_nearest.go index 2c8da265..77ab028a 100644 --- a/backend/testbackend/onnx/onnx_test_resize_nearest.go +++ b/backend/testbackend/onnx/onnx_test_resize_nearest.go @@ -26,7 +26,7 @@ func NewTestResizeNearest() *testbackend.TestCase { Name: "", OpType: "Resize", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011c900)(name:"mode" type:STRING s:"nearest" ) + (*pb.AttributeProto)(0xc000127700)(name:"mode" type:STRING s:"nearest" ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_resize_nearest_test.go b/backend/testbackend/onnx/onnx_test_resize_nearest_test.go new file mode 100644 index 00000000..2baf158f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_resize_nearest_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestResizeNearest(t *testing.T) { + mytest := NewTestResizeNearest() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_resize_upsample_linear.go b/backend/testbackend/onnx/onnx_test_resize_upsample_linear.go index d3f0ec69..1abe61e4 100644 --- a/backend/testbackend/onnx/onnx_test_resize_upsample_linear.go +++ b/backend/testbackend/onnx/onnx_test_resize_upsample_linear.go @@ -26,7 +26,7 @@ func NewTestResizeUpsampleLinear() *testbackend.TestCase { Name: "", OpType: "Resize", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013de00)(name:"mode" type:STRING s:"linear" ) + (*pb.AttributeProto)(0xc000119500)(name:"mode" type:STRING s:"linear" ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_resize_upsample_linear_test.go b/backend/testbackend/onnx/onnx_test_resize_upsample_linear_test.go new file mode 100644 index 00000000..1beb821b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_resize_upsample_linear_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestResizeUpsampleLinear(t *testing.T) { + mytest := NewTestResizeUpsampleLinear() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_resize_upsample_nearest.go b/backend/testbackend/onnx/onnx_test_resize_upsample_nearest.go index 0ecfc764..0c7a0720 100644 --- a/backend/testbackend/onnx/onnx_test_resize_upsample_nearest.go +++ b/backend/testbackend/onnx/onnx_test_resize_upsample_nearest.go @@ -26,7 +26,7 @@ func NewTestResizeUpsampleNearest() *testbackend.TestCase { Name: "", OpType: "Resize", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011d100)(name:"mode" type:STRING s:"nearest" ) + (*pb.AttributeProto)(0xc000358200)(name:"mode" type:STRING s:"nearest" ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_resize_upsample_nearest_test.go b/backend/testbackend/onnx/onnx_test_resize_upsample_nearest_test.go new file mode 100644 index 00000000..ce675908 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_resize_upsample_nearest_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestResizeUpsampleNearest(t *testing.T) { + mytest := NewTestResizeUpsampleNearest() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reversesequence_batch.go b/backend/testbackend/onnx/onnx_test_reversesequence_batch.go new file mode 100644 index 00000000..4d846e38 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reversesequence_batch.go @@ -0,0 +1,58 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("ReverseSequence", "TestReversesequenceBatch", NewTestReversesequenceBatch) +} + +// NewTestReversesequenceBatch version: 5. +func NewTestReversesequenceBatch() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "ReverseSequence", + Title: "TestReversesequenceBatch", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xb0, 0x1, 0xa, 0x4b, 0xa, 0x1, 0x78, 0xa, 0xd, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x73, 0x12, 0x1, 0x79, 0x22, 0xf, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x2a, 0x11, 0xa, 0xa, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x61, 0x78, 0x69, 0x73, 0x18, 0x0, 0xa0, 0x1, 0x2, 0x2a, 0x10, 0xa, 0x9, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x61, 0x78, 0x69, 0x73, 0x18, 0x1, 0xa0, 0x1, 0x2, 0x12, 0x1a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5a, 0x13, 0xa, 0x1, 0x78, 0x12, 0xe, 0xa, 0xc, 0x8, 0x1, 0x12, 0x8, 0xa, 0x2, 0x8, 0x4, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x1b, 0xa, 0xd, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x4, 0x62, 0x13, 0xa, 0x1, 0x79, 0x12, 0xe, 0xa, 0xc, 0x8, 0x1, 0x12, 0x8, 0xa, 0x2, 0x8, 0x4, 0xa, 0x2, 0x8, 0x4, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"x", "sequence_lens"}, + Output: []string{"y"}, + Name: "", + OpType: "ReverseSequence", + Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { + (*pb.AttributeProto)(0xc000358700)(name:"batch_axis" type:INT ), + (*pb.AttributeProto)(0xc000358800)(name:"time_axis" type:INT i:1 ) + } + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(4, 4), + tensor.WithBacking([]float32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}), + ), + + tensor.New( + tensor.WithShape(4), + tensor.WithBacking([]int64{1, 2, 3, 4}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(4, 4), + tensor.WithBacking([]float32{0, 1, 2, 3, 5, 4, 6, 7, 10, 9, 8, 11, 15, 14, 13, 12}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_reversesequence_batch_test.go b/backend/testbackend/onnx/onnx_test_reversesequence_batch_test.go new file mode 100644 index 00000000..9d7cc3b6 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reversesequence_batch_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReversesequenceBatch(t *testing.T) { + mytest := NewTestReversesequenceBatch() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_reversesequence_time.go b/backend/testbackend/onnx/onnx_test_reversesequence_time.go new file mode 100644 index 00000000..aa14eb9a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reversesequence_time.go @@ -0,0 +1,58 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("ReverseSequence", "TestReversesequenceTime", NewTestReversesequenceTime) +} + +// NewTestReversesequenceTime version: 5. +func NewTestReversesequenceTime() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "ReverseSequence", + Title: "TestReversesequenceTime", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xaf, 0x1, 0xa, 0x4b, 0xa, 0x1, 0x78, 0xa, 0xd, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x73, 0x12, 0x1, 0x79, 0x22, 0xf, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x2a, 0x11, 0xa, 0xa, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x61, 0x78, 0x69, 0x73, 0x18, 0x1, 0xa0, 0x1, 0x2, 0x2a, 0x10, 0xa, 0x9, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x61, 0x78, 0x69, 0x73, 0x18, 0x0, 0xa0, 0x1, 0x2, 0x12, 0x19, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5a, 0x13, 0xa, 0x1, 0x78, 0x12, 0xe, 0xa, 0xc, 0x8, 0x1, 0x12, 0x8, 0xa, 0x2, 0x8, 0x4, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x1b, 0xa, 0xd, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x4, 0x62, 0x13, 0xa, 0x1, 0x79, 0x12, 0xe, 0xa, 0xc, 0x8, 0x1, 0x12, 0x8, 0xa, 0x2, 0x8, 0x4, 0xa, 0x2, 0x8, 0x4, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"x", "sequence_lens"}, + Output: []string{"y"}, + Name: "", + OpType: "ReverseSequence", + Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { + (*pb.AttributeProto)(0xc000358a00)(name:"batch_axis" type:INT i:1 ), + (*pb.AttributeProto)(0xc000358b00)(name:"time_axis" type:INT ) + } + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(4, 4), + tensor.WithBacking([]float32{0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15}), + ), + + tensor.New( + tensor.WithShape(4), + tensor.WithBacking([]int64{4, 3, 2, 1}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(4, 4), + tensor.WithBacking([]float32{3, 6, 9, 12, 2, 5, 8, 13, 1, 4, 10, 14, 0, 7, 11, 15}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_reversesequence_time_test.go b/backend/testbackend/onnx/onnx_test_reversesequence_time_test.go new file mode 100644 index 00000000..8684d052 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_reversesequence_time_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestReversesequenceTime(t *testing.T) { + mytest := NewTestReversesequenceTime() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_roialign.go b/backend/testbackend/onnx/onnx_test_roialign.go new file mode 100644 index 00000000..ab5dace2 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_roialign.go @@ -0,0 +1,65 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("RoiAlign", "TestRoialign", NewTestRoialign) +} + +// NewTestRoialign version: 5. +func NewTestRoialign() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "RoiAlign", + Title: "TestRoialign", + ModelB: []byte{0x8, 0x5, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x81, 0x2, 0xa, 0x80, 0x1, 0xa, 0x1, 0x58, 0xa, 0x4, 0x72, 0x6f, 0x69, 0x73, 0xa, 0xd, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1, 0x59, 0x22, 0x8, 0x52, 0x6f, 0x69, 0x41, 0x6c, 0x69, 0x67, 0x6e, 0x2a, 0x14, 0xa, 0xd, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x5, 0xa0, 0x1, 0x2, 0x2a, 0x13, 0xa, 0xc, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x5, 0xa0, 0x1, 0x2, 0x2a, 0x15, 0xa, 0xe, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x2, 0xa0, 0x1, 0x2, 0x2a, 0x17, 0xa, 0xd, 0x73, 0x70, 0x61, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x15, 0x0, 0x0, 0x80, 0x3f, 0xa0, 0x1, 0x1, 0x12, 0xd, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x6f, 0x69, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x5a, 0x1b, 0xa, 0x1, 0x58, 0x12, 0x16, 0xa, 0x14, 0x8, 0x1, 0x12, 0x10, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0xa, 0xa, 0x2, 0x8, 0xa, 0x5a, 0x16, 0xa, 0x4, 0x72, 0x6f, 0x69, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x1, 0x12, 0x8, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x4, 0x5a, 0x1b, 0xa, 0xd, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x3, 0x62, 0x1b, 0xa, 0x1, 0x59, 0x12, 0x16, 0xa, 0x14, 0x8, 0x1, 0x12, 0x10, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x1, 0xa, 0x2, 0x8, 0x5, 0xa, 0x2, 0x8, 0x5, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"X", "rois", "batch_indices"}, + Output: []string{"Y"}, + Name: "", + OpType: "RoiAlign", + Attributes: ([]*pb.AttributeProto) (len=4 cap=4) { + (*pb.AttributeProto)(0xc000236300)(name:"output_height" type:INT i:5 ), + (*pb.AttributeProto)(0xc000236400)(name:"output_width" type:INT i:5 ), + (*pb.AttributeProto)(0xc000236500)(name:"sampling_ratio" type:INT i:2 ), + (*pb.AttributeProto)(0xc000236600)(name:"spatial_scale" type:FLOAT f:1 ) + } + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1, 1, 10, 10), + tensor.WithBacking([]float32{0.2764, 0.715, 0.1958, 0.3416, 0.4638, 0.0259, 0.2963, 0.6518, 0.4856, 0.725, 0.9637, 0.0895, 0.2919, 0.6753, 0.0234, 0.6132, 0.8085, 0.5324, 0.8992, 0.4467, 0.3265, 0.8479, 0.9698, 0.2471, 0.9336, 0.1878, 0.4766, 0.4308, 0.34, 0.2162, 0.0206, 0.172, 0.2155, 0.4394, 0.0653, 0.3406, 0.7724, 0.3921, 0.2541, 0.5799, 0.4062, 0.2194, 0.4473, 0.4687, 0.7109, 0.9327, 0.9815, 0.632, 0.1728, 0.6119, 0.3097, 0.1283, 0.4984, 0.5068, 0.4279, 0.0173, 0.4388, 0.043, 0.4671, 0.7119, 0.1011, 0.8477, 0.4726, 0.1777, 0.9923, 0.4042, 0.1869, 0.7795, 0.9946, 0.9689, 0.1366, 0.3671, 0.7011, 0.6234, 0.9867, 0.5585, 0.6985, 0.5609, 0.8788, 0.9928, 0.5697, 0.8511, 0.6711, 0.9406, 0.8751, 0.7496, 0.165, 0.1049, 0.1559, 0.2514, 0.7012, 0.4056, 0.7879, 0.3461, 0.0415, 0.2998, 0.5094, 0.3727, 0.5482, 0.0502}), + ), + + tensor.New( + tensor.WithShape(3, 4), + tensor.WithBacking([]float32{0, 0, 9, 9, 0, 5, 4, 9, 5, 5, 9, 9}), + ), + + tensor.New( + tensor.WithShape(3), + tensor.WithBacking([]int64{0, 0, 0}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3, 1, 5, 5), + tensor.WithBacking([]float32{0.4664, 0.4466, 0.3405, 0.5688, 0.6068, 0.3714, 0.4296, 0.3835, 0.5562, 0.351, 0.2768, 0.4883, 0.5222, 0.5528, 0.4171, 0.4713, 0.4844, 0.6904, 0.492, 0.8774, 0.6239, 0.7125, 0.6289, 0.3355, 0.3495, 0.3022, 0.4305, 0.4696, 0.3978, 0.5423, 0.3656, 0.705, 0.5165, 0.3172, 0.7015, 0.2912, 0.5059, 0.6476, 0.6235, 0.8299, 0.5916, 0.7389, 0.7048, 0.8372, 0.8893, 0.6227, 0.6153, 0.7097, 0.6154, 0.4585, 0.2384, 0.3379, 0.3717, 0.61, 0.7601, 0.3767, 0.3785, 0.7147, 0.9243, 0.9727, 0.5749, 0.5826, 0.5709, 0.7619, 0.877, 0.5355, 0.2566, 0.2141, 0.2796, 0.36, 0.4365, 0.3504, 0.2887, 0.3661, 0.2349}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_roialign_test.go b/backend/testbackend/onnx/onnx_test_roialign_test.go new file mode 100644 index 00000000..d3767e6e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_roialign_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestRoialign(t *testing.T) { + mytest := NewTestRoialign() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_scan9_sum.go b/backend/testbackend/onnx/onnx_test_scan9_sum.go index d79d14cb..7cf71fb6 100644 --- a/backend/testbackend/onnx/onnx_test_scan9_sum.go +++ b/backend/testbackend/onnx/onnx_test_scan9_sum.go @@ -26,8 +26,8 @@ func NewTestScan9Sum() *testbackend.TestCase { Name: "", OpType: "Scan", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013df00)(name:"body" type:GRAPH g: node: name:"scan_body" input: > > > > input: > > > > output: > > > > output: > > > > > ), - (*pb.AttributeProto)(0xc0011e6000)(name:"num_scan_inputs" type:INT i:1 ) + (*pb.AttributeProto)(0xc000359500)(name:"body" type:GRAPH g: node: name:"scan_body" input: > > > > input: > > > > output: > > > > output: > > > > > ), + (*pb.AttributeProto)(0xc000359600)(name:"num_scan_inputs" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_scan9_sum_test.go b/backend/testbackend/onnx/onnx_test_scan9_sum_test.go new file mode 100644 index 00000000..a2482f99 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_scan9_sum_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestScan9Sum(t *testing.T) { + mytest := NewTestScan9Sum() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_scatter_with_axis.go b/backend/testbackend/onnx/onnx_test_scatter_with_axis.go index ed6d8eb3..93ec330a 100644 --- a/backend/testbackend/onnx/onnx_test_scatter_with_axis.go +++ b/backend/testbackend/onnx/onnx_test_scatter_with_axis.go @@ -26,7 +26,7 @@ func NewTestScatterWithAxis() *testbackend.TestCase { Name: "", OpType: "Scatter", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc0011e6300)(name:"axis" type:INT i:1 ) + (*pb.AttributeProto)(0xc000126500)(name:"axis" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_scatter_with_axis_test.go b/backend/testbackend/onnx/onnx_test_scatter_with_axis_test.go new file mode 100644 index 00000000..174b7413 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_scatter_with_axis_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestScatterWithAxis(t *testing.T) { + mytest := NewTestScatterWithAxis() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_scatter_without_axis_test.go b/backend/testbackend/onnx/onnx_test_scatter_without_axis_test.go new file mode 100644 index 00000000..f10215c8 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_scatter_without_axis_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestScatterWithoutAxis(t *testing.T) { + mytest := NewTestScatterWithoutAxis() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_selu.go b/backend/testbackend/onnx/onnx_test_selu.go index c1e3c774..b8d90782 100644 --- a/backend/testbackend/onnx/onnx_test_selu.go +++ b/backend/testbackend/onnx/onnx_test_selu.go @@ -26,8 +26,8 @@ func NewTestSelu() *testbackend.TestCase { Name: "", OpType: "Selu", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011db00)(name:"alpha" type:FLOAT f:2 ), - (*pb.AttributeProto)(0xc00011dc00)(name:"gamma" type:FLOAT f:3 ) + (*pb.AttributeProto)(0xc000118700)(name:"alpha" type:FLOAT f:2 ), + (*pb.AttributeProto)(0xc000118800)(name:"gamma" type:FLOAT f:3 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_selu_default_test.go b/backend/testbackend/onnx/onnx_test_selu_default_test.go new file mode 100644 index 00000000..2927c647 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_selu_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSeluDefault(t *testing.T) { + mytest := NewTestSeluDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_selu_example.go b/backend/testbackend/onnx/onnx_test_selu_example.go index 03d34bce..236f5610 100644 --- a/backend/testbackend/onnx/onnx_test_selu_example.go +++ b/backend/testbackend/onnx/onnx_test_selu_example.go @@ -26,8 +26,8 @@ func NewTestSeluExample() *testbackend.TestCase { Name: "", OpType: "Selu", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc0011e7100)(name:"alpha" type:FLOAT f:2 ), - (*pb.AttributeProto)(0xc0011e7200)(name:"gamma" type:FLOAT f:3 ) + (*pb.AttributeProto)(0xc000118e00)(name:"alpha" type:FLOAT f:2 ), + (*pb.AttributeProto)(0xc000118f00)(name:"gamma" type:FLOAT f:3 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_selu_example_test.go b/backend/testbackend/onnx/onnx_test_selu_example_test.go new file mode 100644 index 00000000..9dd404bb --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_selu_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSeluExample(t *testing.T) { + mytest := NewTestSeluExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_selu_test.go b/backend/testbackend/onnx/onnx_test_selu_test.go new file mode 100644 index 00000000..ebf3ff1c --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_selu_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSelu(t *testing.T) { + mytest := NewTestSelu() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_shape_example_test.go b/backend/testbackend/onnx/onnx_test_shape_example_test.go new file mode 100644 index 00000000..9a65234f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_shape_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestShapeExample(t *testing.T) { + mytest := NewTestShapeExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_shape_test.go b/backend/testbackend/onnx/onnx_test_shape_test.go new file mode 100644 index 00000000..b6666311 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_shape_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestShape(t *testing.T) { + mytest := NewTestShape() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_shrink_hard.go b/backend/testbackend/onnx/onnx_test_shrink_hard.go index 36693ccf..06823aa0 100644 --- a/backend/testbackend/onnx/onnx_test_shrink_hard.go +++ b/backend/testbackend/onnx/onnx_test_shrink_hard.go @@ -26,7 +26,7 @@ func NewTestShrinkHard() *testbackend.TestCase { Name: "", OpType: "Shrink", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011c100)(name:"lambd" type:FLOAT f:1.5 ) + (*pb.AttributeProto)(0xc000127c00)(name:"lambd" type:FLOAT f:1.5 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_shrink_hard_test.go b/backend/testbackend/onnx/onnx_test_shrink_hard_test.go new file mode 100644 index 00000000..0df34184 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_shrink_hard_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestShrinkHard(t *testing.T) { + mytest := NewTestShrinkHard() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_shrink_soft.go b/backend/testbackend/onnx/onnx_test_shrink_soft.go index 89c97dc7..d19b188a 100644 --- a/backend/testbackend/onnx/onnx_test_shrink_soft.go +++ b/backend/testbackend/onnx/onnx_test_shrink_soft.go @@ -26,8 +26,8 @@ func NewTestShrinkSoft() *testbackend.TestCase { Name: "", OpType: "Shrink", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00013c500)(name:"bias" type:FLOAT f:1.5 ), - (*pb.AttributeProto)(0xc00013c600)(name:"lambd" type:FLOAT f:1.5 ) + (*pb.AttributeProto)(0xc000132300)(name:"bias" type:FLOAT f:1.5 ), + (*pb.AttributeProto)(0xc000132400)(name:"lambd" type:FLOAT f:1.5 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_shrink_soft_test.go b/backend/testbackend/onnx/onnx_test_shrink_soft_test.go new file mode 100644 index 00000000..5c869433 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_shrink_soft_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestShrinkSoft(t *testing.T) { + mytest := NewTestShrinkSoft() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sigmoid_example_test.go b/backend/testbackend/onnx/onnx_test_sigmoid_example_test.go new file mode 100644 index 00000000..33fdd56a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sigmoid_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSigmoidExample(t *testing.T) { + mytest := NewTestSigmoidExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sigmoid_test.go b/backend/testbackend/onnx/onnx_test_sigmoid_test.go new file mode 100644 index 00000000..d44fa69e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sigmoid_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSigmoid(t *testing.T) { + mytest := NewTestSigmoid() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sign_test.go b/backend/testbackend/onnx/onnx_test_sign_test.go new file mode 100644 index 00000000..25131774 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sign_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSign(t *testing.T) { + mytest := NewTestSign() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sin_example_test.go b/backend/testbackend/onnx/onnx_test_sin_example_test.go new file mode 100644 index 00000000..8b3f317b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sin_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSinExample(t *testing.T) { + mytest := NewTestSinExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sin_test.go b/backend/testbackend/onnx/onnx_test_sin_test.go new file mode 100644 index 00000000..80a362d0 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sin_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSin(t *testing.T) { + mytest := NewTestSin() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sinh_example_test.go b/backend/testbackend/onnx/onnx_test_sinh_example_test.go new file mode 100644 index 00000000..1154702f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sinh_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSinhExample(t *testing.T) { + mytest := NewTestSinhExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sinh_test.go b/backend/testbackend/onnx/onnx_test_sinh_test.go new file mode 100644 index 00000000..a8cb904b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sinh_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSinh(t *testing.T) { + mytest := NewTestSinh() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_size.go b/backend/testbackend/onnx/onnx_test_size.go new file mode 100644 index 00000000..6e6e556f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_size.go @@ -0,0 +1,50 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("Size", "TestSize", NewTestSize) +} + +// NewTestSize version: 3. +func NewTestSize() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "Size", + Title: "TestSize", + ModelB: []byte{0x8, 0x3, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x3f, 0xa, 0xc, 0xa, 0x1, 0x78, 0x12, 0x1, 0x79, 0x22, 0x4, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x9, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5a, 0x17, 0xa, 0x1, 0x78, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x4, 0xa, 0x2, 0x8, 0x5, 0x62, 0xb, 0xa, 0x1, 0x79, 0x12, 0x6, 0xa, 0x4, 0x8, 0x7, 0x12, 0x0, 0x42, 0x2, 0x10, 0x9}, + + /* + + &pb.NodeProto{ + Input: []string{"x"}, + Output: []string{"y"}, + Name: "", + OpType: "Size", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3, 4, 5), + tensor.WithBacking([]float32{1.7640524, 0.4001572, 0.978738, 2.2408931, 1.867558, -0.9772779, 0.95008844, -0.1513572, -0.10321885, 0.41059852, 0.14404356, 1.4542735, 0.7610377, 0.121675014, 0.44386324, 0.33367434, 1.4940791, -0.20515826, 0.3130677, -0.85409576, -2.5529897, 0.6536186, 0.8644362, -0.742165, 2.2697546, -1.4543657, 0.045758516, -0.18718386, 1.5327792, 1.4693588, 0.15494743, 0.37816253, -0.88778573, -1.9807965, -0.34791216, 0.15634897, 1.2302907, 1.2023798, -0.3873268, -0.30230275, -1.048553, -1.420018, -1.7062702, 1.9507754, -0.5096522, -0.4380743, -1.2527953, 0.7774904, -1.6138978, -0.21274029, -0.89546657, 0.3869025, -0.51080513, -1.1806322, -0.028182229, 0.42833188, 0.06651722, 0.3024719, -0.6343221, -0.36274117}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{60}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_size_example.go b/backend/testbackend/onnx/onnx_test_size_example.go new file mode 100644 index 00000000..22f0d323 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_size_example.go @@ -0,0 +1,50 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("Size", "TestSizeExample", NewTestSizeExample) +} + +// NewTestSizeExample version: 3. +func NewTestSizeExample() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "Size", + Title: "TestSizeExample", + ModelB: []byte{0x8, 0x3, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x43, 0xa, 0xc, 0xa, 0x1, 0x78, 0x12, 0x1, 0x79, 0x22, 0x4, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x11, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5a, 0x13, 0xa, 0x1, 0x78, 0x12, 0xe, 0xa, 0xc, 0x8, 0x1, 0x12, 0x8, 0xa, 0x2, 0x8, 0x2, 0xa, 0x2, 0x8, 0x3, 0x62, 0xb, 0xa, 0x1, 0x79, 0x12, 0x6, 0xa, 0x4, 0x8, 0x7, 0x12, 0x0, 0x42, 0x2, 0x10, 0x9}, + + /* + + &pb.NodeProto{ + Input: []string{"x"}, + Output: []string{"y"}, + Name: "", + OpType: "Size", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(2, 3), + tensor.WithBacking([]float32{1, 2, 3, 4, 5, 6}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{6}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_size_example_test.go b/backend/testbackend/onnx/onnx_test_size_example_test.go new file mode 100644 index 00000000..d9aa595b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_size_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSizeExample(t *testing.T) { + mytest := NewTestSizeExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_size_test.go b/backend/testbackend/onnx/onnx_test_size_test.go new file mode 100644 index 00000000..a6b32fd4 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_size_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSize(t *testing.T) { + mytest := NewTestSize() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_slice_default_axes_test.go b/backend/testbackend/onnx/onnx_test_slice_default_axes_test.go new file mode 100644 index 00000000..a0f82fcc --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_slice_default_axes_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSliceDefaultAxes(t *testing.T) { + mytest := NewTestSliceDefaultAxes() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_slice_default_steps_test.go b/backend/testbackend/onnx/onnx_test_slice_default_steps_test.go new file mode 100644 index 00000000..a8ff7527 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_slice_default_steps_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSliceDefaultSteps(t *testing.T) { + mytest := NewTestSliceDefaultSteps() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_slice_end_out_of_bounds.go b/backend/testbackend/onnx/onnx_test_slice_end_out_of_bounds.go new file mode 100644 index 00000000..105850b4 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_slice_end_out_of_bounds.go @@ -0,0 +1,70 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("Slice", "TestSliceEndOutOfBounds", NewTestSliceEndOutOfBounds) +} + +// NewTestSliceEndOutOfBounds version: 4. +func NewTestSliceEndOutOfBounds() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "Slice", + Title: "TestSliceEndOutOfBounds", + ModelB: []byte{0x8, 0x4, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xcd, 0x1, 0xa, 0x28, 0xa, 0x1, 0x78, 0xa, 0x6, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0xa, 0x4, 0x65, 0x6e, 0x64, 0x73, 0xa, 0x4, 0x61, 0x78, 0x65, 0x73, 0xa, 0x5, 0x73, 0x74, 0x65, 0x70, 0x73, 0x12, 0x1, 0x79, 0x22, 0x5, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x5a, 0x17, 0xa, 0x1, 0x78, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x14, 0xa, 0x2, 0x8, 0xa, 0xa, 0x2, 0x8, 0x5, 0x5a, 0x14, 0xa, 0x6, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x12, 0xa, 0x4, 0x65, 0x6e, 0x64, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x12, 0xa, 0x4, 0x61, 0x78, 0x65, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x13, 0xa, 0x5, 0x73, 0x74, 0x65, 0x70, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x17, 0xa, 0x1, 0x79, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x14, 0xa, 0x2, 0x8, 0x9, 0xa, 0x2, 0x8, 0x5, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"x", "starts", "ends", "axes", "steps"}, + Output: []string{"y"}, + Name: "", + OpType: "Slice", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(20, 10, 5), + tensor.WithBacking([]float32{1.7640524, 0.4001572, 0.978738, 2.2408931, 1.867558, -0.9772779, 0.95008844, -0.1513572, -0.10321885, 0.41059852, 0.14404356, 1.4542735, 0.7610377, 0.121675014, 0.44386324, 0.33367434, 1.4940791, -0.20515826, 0.3130677, -0.85409576, -2.5529897, 0.6536186, 0.8644362, -0.742165, 2.2697546, -1.4543657, 0.045758516, -0.18718386, 1.5327792, 1.4693588, 0.15494743, 0.37816253, -0.88778573, -1.9807965, -0.34791216, 0.15634897, 1.2302907, 1.2023798, -0.3873268, -0.30230275, -1.048553, -1.420018, -1.7062702, 1.9507754, -0.5096522, -0.4380743, -1.2527953, 0.7774904, -1.6138978, -0.21274029, -0.89546657, 0.3869025, -0.51080513, -1.1806322, -0.028182229, 0.42833188, 0.06651722, 0.3024719, -0.6343221, -0.36274117, -0.67246044, -0.35955316, -0.8131463, -1.7262826, 0.17742614, -0.40178093, -1.6301984, 0.46278226, -0.9072984, 0.051945396, 0.7290906, 0.12898292, 1.1394007, -1.2348258, 0.40234163, -0.6848101, -0.87079716, -0.5788497, -0.31155252, 0.05616534, -1.1651498, 0.9008265, 0.46566245, -1.5362437, 1.4882522, 1.8958892, 1.1787796, -0.17992483, -1.0707526, 1.0544517, -0.40317693, 1.222445, 0.20827498, 0.97663903, 0.3563664, 0.7065732, 0.01050002, 1.7858706, 0.12691209, 0.40198937, 1.8831507, -1.347759, -1.270485, 0.9693967, -1.1731234, 1.9436212, -0.41361898, -0.7474548, 1.922942, 1.4805148, 1.867559, 0.90604466, -0.86122566, 1.9100649, -0.26800337, 0.8024564, 0.947252, -0.15501009, 0.61407936, 0.9222067, 0.37642553, -1.0994008, 0.2982382, 1.3263859, -0.69456786, -0.14963454, -0.43515354, 1.8492638, 0.67229474, 0.40746182, -0.76991606, 0.5392492, -0.6743327, 0.031830557, -0.6358461, 0.67643327, 0.57659084, -0.20829876, 0.3960067, -1.0930616, -1.4912575, 0.4393917, 0.1666735, 0.63503146, 2.3831449, 0.94447947, -0.91282225, 1.1170163, -1.3159074, -0.4615846, -0.0682416, 1.7133427, -0.74475485, -0.82643855, -0.09845252, -0.6634783, 1.1266359, -1.0799315, -1.1474687, -0.43782005, -0.49803245, 1.929532, 0.9494208, 0.08755124, -1.2254355, 0.844363, -1.0002153, -1.5447711, 1.1880298, 0.3169426, 0.9208588, 0.31872764, 0.8568306, -0.6510256, -1.0342429, 0.6815945, -0.80340964, -0.6895498, -0.4555325, 0.017479159, -0.35399392, -1.3749512, -0.6436184, -2.2234032, 0.62523144, -1.6020577, -1.1043833, 0.05216508, -0.739563, 1.5430146, -1.2928569, 0.26705086, -0.039282817, -1.1680934, 0.5232767, -0.17154633, 0.77179056, 0.82350415, 2.163236, 1.336528, -0.36918184, -0.23937918, 1.0996596, 0.6552637, 0.64013153, -1.616956, -0.024326125, -0.7380309, 0.2799246, -0.09815039, 0.9101789, 0.3172182, 0.78632796, -0.4664191, -0.94444627, -0.4100497, -0.017020414, 0.37915173, 2.259309, -0.042257152, -0.955945, -0.34598178, -0.463596, 0.48148146, -1.540797, 0.06326199, 0.15650654, 0.23218104, -0.5973161, -0.23792173, -1.424061, -0.49331987, -0.54286146, 0.41605005, -1.1561824, 0.7811981, 1.4944845, -2.069985, 0.42625874, 0.676908, -0.63743705, -0.3972718, -0.13288058, -0.29779088, -0.30901298, -1.6760038, 1.1523316, 1.0796186, -0.81336427, -1.4664243, 0.5210649, -0.57578796, 0.14195317, -0.31932843, 0.69153875, 0.6947491, -0.7255974, -1.383364, -1.5829384, 0.6103794, -1.1888592, -0.5068163, -0.596314, -0.052567296, -1.9362798, 0.1887786, 0.52389103, 0.08842209, -0.31088617, 0.097400166, 0.39904633, -2.7725928, 1.9559124, 0.39009333, -0.6524086, -0.39095336, 0.49374178, -0.11610394, -2.0306845, 2.064493, -0.11054066, 1.0201727, -0.69204986, 1.5363771, 0.2863437, 0.60884386, -1.0452534, 1.2111453, 0.68981814, 1.3018463, -0.6280876, -0.48102713, 2.3039167, -1.0600158, -0.1359497, 1.1368914, 0.09772497, 0.5829537, -0.39944902, 0.37005588, -1.3065269, 1.6581306, -0.11816405, -0.6801782, 0.6663831, -0.4607198, -1.3342584, -1.3467175, 0.69377315, -0.15957344, -0.13370156, 1.0777438, -1.1268258, -0.7306777, -0.3848798, 0.09435159, -0.042171452, -0.2868872, -0.0616264, -0.10730527, -0.7196044, -0.812993, 0.27451634, -0.8909151, -1.1573553, -0.31229225, -0.15766701, 2.2567234, -0.7047003, 0.9432607, 0.7471883, -1.1889449, 0.77325296, -1.1838807, -2.6591723, 0.60631955, -1.7558906, 0.45093447, -0.6840109, 1.6595508, 1.0685093, -0.4533858, -0.6878376, -1.2140774, -0.44092262, -0.28035548, -0.36469355, 0.15670386, 0.5785215, 0.34965447, -0.76414394, -1.4377915, 1.3645319, -0.6894492, -0.6522936, -0.52118933, -1.8430696, -0.477974, -0.4796558, 0.6203583, 0.6984571, 0.003770889, 0.93184835, 0.339965, -0.015682112, 0.16092817, -0.19065349, -0.3948495, -0.26773354, -1.1280113, 0.2804417, -0.9931236, 0.8416313, -0.24945858, 0.04949498, 0.4938368, 0.6433145, -1.5706234, -0.20690368, 0.8801789, -1.6981058, 0.38728046, -2.2555642, -1.0225068, 0.038630553, -1.6567152, -0.98551077, -1.471835, 1.648135, 0.16422775, 0.5672903, -0.2226751, -0.35343176, -1.6164742, -0.29183736, -0.7614922, 0.8579239, 1.1411018, 1.4665787, 0.85255194, -0.5986539, -1.1158969, 0.7666632, 0.3562928, -1.7685385, 0.3554818, 0.8145198, 0.058925588, -0.18505368, -0.8076485, -1.4465348, 0.800298, -0.30911446, -0.23346666, 1.7327212, 0.6845011, 0.370825, 0.1420618, 1.5199949, 1.7195894, 0.9295051, 0.5822246, -2.094603, 0.12372191, -0.13010696, 0.09395323, 0.9430461, -2.7396772, -0.56931204, 0.26990435, -0.46684554, -1.4169061, 0.8689635, 0.27687192, -0.97110456, 0.3148172, 0.8215857, 0.005292646, 0.8005648, 0.078260176, -0.39522898, -1.1594205, -0.085930765, 0.19429293, 0.87583274, -0.11510747, 0.4574156, -0.964612, -0.78262913, -0.1103893, -1.0546285, 0.8202478, 0.46313033, 0.27909577, 0.3389041, 2.0210435, -0.4688642, -2.2014413, 0.1993002, -0.050603542, -0.51751906, -0.97882986, -0.43918952, 0.18133843, -0.5028167, 2.4124537, -0.96050435, -0.79311734, -2.28862, 0.25148442, -2.0164065, -0.53945464, -0.27567053, -0.70972794, 1.7388726, 0.99439436, 1.3191369, -0.8824188, 1.128594, 0.49600095, 0.77140594, 1.0294389, -0.90876323, -0.42431763, 0.86259604, -2.6556191, 1.5133281, 0.55313206, -0.045703962, 0.22050765, -1.0299352, -0.34994337, 1.1002843, 1.298022, 2.696224, -0.07392467, -0.65855294, -0.51423395, -1.0180418, -0.07785475, 0.38273242, -0.03424228, 1.0963469, -0.2342158, -0.34745064, -0.5812685, -1.6326345, -1.5677677, -1.179158, 1.3014281, 0.8952603, 1.3749641, -1.3322116, -1.9686247, -0.6600563, 0.17581895, 0.49869028, 1.0479722, 0.28427967, 1.7426687, -0.22260568, -0.9130792, -1.6812183, -0.8889713, 0.24211796, -0.8887203, 0.9367425, 1.4123276, -2.369587, 0.8640523, -2.239604, 0.40149906, 1.2248706, 0.064856105, -1.2796892, -0.5854312, -0.26164544, -0.18224478, -0.20289683, -0.10988278, 0.21348006, -1.2085737, -0.24201983, 1.5182612, -0.38464543, -0.4438361, 1.0781974, -2.5591846, 1.1813786, -0.63190377, 0.16392857, 0.09632136, 0.9424681, -0.26759475, -0.6780258, 1.2978458, -2.364174, 0.020334182, -1.3479254, -0.7615734, 2.0112567, -0.044595428, 0.1950697, -1.7815628, -0.7290447, 0.1965574, 0.3547577, 0.61688656, 0.008627899, 0.5270042, 0.4537819, -1.8297404, 0.037005723, 0.76790243, 0.5898798, -0.36385882, -0.8056265, -1.1183119, -0.13105401, 1.1330799, -1.9518042, -0.6598917, -1.1398025, 0.7849575, -0.5543096, -0.47063765, -0.21694957, 0.44539326, -0.392389, -3.046143, 0.5433119, 0.43904296, -0.21954103, -1.0840366, 0.35178012, 0.37923554, -0.47003287, -0.21673147, -0.9301565, -0.17858909, -1.5504293, 0.41731882, -0.9443685, 0.23810315, -1.405963, -0.5900577, -0.110489406, -1.6606998, 0.115147874, -0.37914756, -1.7423562, -1.3032428, 0.60512006, 0.895556, -0.13190864, 0.40476182, 0.22384356, 0.32962298, 1.285984, -1.5069984, 0.67646074, -0.38200897, -0.22425893, -0.30224973, -0.3751471, -1.2261962, 0.1833392, 1.670943, -0.05613302, -0.0013850428, -0.687299, -0.11747455, 0.46616644, -0.37024245, -0.45380405, 0.40326455, -0.91800475, 0.25249663, 0.8203218, 1.3599485, -0.09038201, 1.3675972, 1.0344099, -0.99621266, -1.2179385, -0.30496365, 1.0289356, -0.07228701, -0.6006576, 1.5522432, 0.28690448, -2.3205943, 0.31716064, 0.52004063, 0.22560866, 0.4497121, -0.067275606, -1.3183959, -0.370704, -0.94561577, -0.9327409, -1.2630683, 0.45248908, 0.097896144, -0.44816536, -0.64933795, -0.023423105, 1.0791948, -2.0042157, 0.37687653, -0.545712, -1.8845859, -1.945703, -0.9127835, 0.21950956, 0.39306292, -0.9389816, 1.017021, 1.4229835, 0.39608657, -0.59140265, 1.1244192, 0.7553957, 0.86740744, -0.6564637, -2.8345544, 2.116791, -1.6108783, -0.035768073, 2.3807454, 0.33057675, 0.94924647, -1.5023966, -1.7776669, -0.5327028, 1.0907497, -0.34624946, -0.7946363, 0.19796729, 1.0819352, -1.4449402, -1.210543, -0.7886692, 1.0946383, 0.23482153, 2.1321535, 0.9364457, -0.035095178, 1.2650778, 0.21149701, -0.70492136, 0.67997485, -0.6963267, -0.2903971, 1.3277828, -0.10128149, -0.8031414, -0.46433768, 1.0217906, -0.55254066, -0.38687086, -0.51029277, 0.1839255, -0.38548976, -1.6018361, -0.8871809, -0.932789, 1.2433194, 0.81267405, 0.58725935, -0.50535834, -0.81579155, -0.5075176, -1.0518801, 2.4972005, -2.2453218, 0.56400853, -1.2845523, -0.10434349, -0.98800194, -1.177629, -1.1401963, 1.7549862, -0.13298842, -0.7657022, 0.55578697, 0.010349315, 0.72003376, -1.8242567, 0.30360392, 0.7726948, -1.6615983, 0.44819528, 1.6961815, -0.014857704, 0.82140595, 0.67057043, -0.7075057, 0.039766736, -1.5669947, -0.45130304, 0.26568797, 0.7231005, 0.024612125, 0.71998376, -1.1029062, -0.10169727, 0.019279385, 1.8495913, -0.21416666, -0.49901664, 0.021351224, -0.91911346, 0.19275385, -0.3650552, -1.7913276, -0.058586553, -0.3175431, -1.6324233, -0.06713416, 1.4893559, 0.5213038, 0.6119272, -1.3414967, 0.47689837, 0.14844958, 0.5290452, 0.4226286, -1.3597807, -0.041400813, -0.75787085, -0.050084095, -0.8974009, 1.3124703, -0.8589724, -0.8989422, 0.07458641, -1.0770991, -0.4246633, -0.8299646, 1.411172, 0.78580385, -0.057469517, -0.39121705, 0.9409176, 0.4052041, 0.49805242, -0.026192237, -1.68823, -0.112465985, -0.5324899, 0.6450553, 1.0118425, -0.65795106, 0.46838522, 1.735879, -0.66771275, 1.6819217, -0.85258585, 0.022959756, -0.011145612, 0.0114989, -0.837678, -0.5911831, -0.66772026, 0.3269626, 0.33003512, 2.2259443, 1.370989, -0.50984323, 0.3248696, 0.997118, 0.030601824, -0.069641575, 0.05157494, 0.8672766, -0.84832054, -0.32566947, 0.47043315, 0.31144708, 0.23958276, -0.36980116, 0.9725358, 2.1338682, 0.4064155, -0.1931767, 0.7557403, -0.53913265, -0.74969035, 0.032808747, -2.5827966, -1.1539503, -0.34796184, -1.3533889, -1.0326431, -0.43674833, -1.6429653, -0.40607178, -0.53527015, 0.025405208, 1.154184, 0.17250441, 0.021062022, 0.099454455, 0.22739278, -1.0167387, -0.11477532, 0.30875126, -1.37076, 0.8656529, 1.0813761, -0.63137597, -0.24133779, -0.87819034, 0.69938046, -1.0612223, -0.222477, -0.8589199, 0.05095428, -1.7942293, 1.3264617, -0.9646064, 0.059894685, -0.21252304, -0.7621145, -0.88778013, 0.93639857, -0.5256406, 0.2711702, -0.80149686, -0.64718145, 0.47224715, 0.9304085, -0.17531641, -1.4219198, 1.997956, -0.8565493, -1.5415874, 2.5944245, -0.4040323, -1.4617327, -0.6834398, 0.3675449, 0.19031155, -0.8517292, 1.8227236, -0.5215797, -1.1846865, 0.9606934, 1.3290628, -0.8174931, -1.4013473, 1.0304383, -2.0473237, -1.2266216, 0.96744615, -0.055352546, -0.26393735, 0.3528166, -0.15277442, -1.2986867, 1.2760754, 1.325014, 0.20533256, 0.045134015, 2.339625, -0.27643284, -0.25957698, 0.36448124, 1.471322, 1.5927707, -0.25857264, 0.30833125, -1.3780835, -0.3119761, -0.84029037, -1.0068318, 1.6815767, -0.79228663, -0.5316059, 0.36584878, 1.2978252, 0.48111513, 2.759355, -0.074667975, 0.25871643, 0.27560067, 1.4350494, 0.5072389, -0.1162297, -0.9474886, 0.24444346, 1.4013448, -0.4103818, 0.5289436, 0.24614778, 0.86351967, -0.8047537, 2.346647, -1.2791611, -0.36555108, 0.9380925, 0.29673317, 0.82998616, -0.49610233, -0.074804984, 0.012231983, 1.5692596, 0.69042903, 0.7966721, -0.6579261, 0.9688826, 0.22558166, 1.3891454, 2.0140603, -0.30676576, -0.40630314, -0.86404496, -0.14357951, -0.38202545, 0.3595044, -0.14456682, -0.36159927, 1.0645851, -0.9378802, 0.43310794, -0.40594172, 0.7243685, 1.3852615, -0.30309826, 0.44103292, 0.17879286, -0.7994224, 0.2407875, 0.2891205, 0.41287082, -0.1983989, 0.0941923, -1.1476109, -0.35811406}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{1}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{1000}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{1}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{1}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(20, 9, 5), + tensor.WithBacking([]float32{-0.9772779, 0.95008844, -0.1513572, -0.10321885, 0.41059852, 0.14404356, 1.4542735, 0.7610377, 0.121675014, 0.44386324, 0.33367434, 1.4940791, -0.20515826, 0.3130677, -0.85409576, -2.5529897, 0.6536186, 0.8644362, -0.742165, 2.2697546, -1.4543657, 0.045758516, -0.18718386, 1.5327792, 1.4693588, 0.15494743, 0.37816253, -0.88778573, -1.9807965, -0.34791216, 0.15634897, 1.2302907, 1.2023798, -0.3873268, -0.30230275, -1.048553, -1.420018, -1.7062702, 1.9507754, -0.5096522, -0.4380743, -1.2527953, 0.7774904, -1.6138978, -0.21274029, 0.42833188, 0.06651722, 0.3024719, -0.6343221, -0.36274117, -0.67246044, -0.35955316, -0.8131463, -1.7262826, 0.17742614, -0.40178093, -1.6301984, 0.46278226, -0.9072984, 0.051945396, 0.7290906, 0.12898292, 1.1394007, -1.2348258, 0.40234163, -0.6848101, -0.87079716, -0.5788497, -0.31155252, 0.05616534, -1.1651498, 0.9008265, 0.46566245, -1.5362437, 1.4882522, 1.8958892, 1.1787796, -0.17992483, -1.0707526, 1.0544517, -0.40317693, 1.222445, 0.20827498, 0.97663903, 0.3563664, 0.7065732, 0.01050002, 1.7858706, 0.12691209, 0.40198937, 1.9436212, -0.41361898, -0.7474548, 1.922942, 1.4805148, 1.867559, 0.90604466, -0.86122566, 1.9100649, -0.26800337, 0.8024564, 0.947252, -0.15501009, 0.61407936, 0.9222067, 0.37642553, -1.0994008, 0.2982382, 1.3263859, -0.69456786, -0.14963454, -0.43515354, 1.8492638, 0.67229474, 0.40746182, -0.76991606, 0.5392492, -0.6743327, 0.031830557, -0.6358461, 0.67643327, 0.57659084, -0.20829876, 0.3960067, -1.0930616, -1.4912575, 0.4393917, 0.1666735, 0.63503146, 2.3831449, 0.94447947, -0.91282225, 1.1170163, -1.3159074, -0.4615846, -0.6634783, 1.1266359, -1.0799315, -1.1474687, -0.43782005, -0.49803245, 1.929532, 0.9494208, 0.08755124, -1.2254355, 0.844363, -1.0002153, -1.5447711, 1.1880298, 0.3169426, 0.9208588, 0.31872764, 0.8568306, -0.6510256, -1.0342429, 0.6815945, -0.80340964, -0.6895498, -0.4555325, 0.017479159, -0.35399392, -1.3749512, -0.6436184, -2.2234032, 0.62523144, -1.6020577, -1.1043833, 0.05216508, -0.739563, 1.5430146, -1.2928569, 0.26705086, -0.039282817, -1.1680934, 0.5232767, -0.17154633, 0.77179056, 0.82350415, 2.163236, 1.336528, -1.616956, -0.024326125, -0.7380309, 0.2799246, -0.09815039, 0.9101789, 0.3172182, 0.78632796, -0.4664191, -0.94444627, -0.4100497, -0.017020414, 0.37915173, 2.259309, -0.042257152, -0.955945, -0.34598178, -0.463596, 0.48148146, -1.540797, 0.06326199, 0.15650654, 0.23218104, -0.5973161, -0.23792173, -1.424061, -0.49331987, -0.54286146, 0.41605005, -1.1561824, 0.7811981, 1.4944845, -2.069985, 0.42625874, 0.676908, -0.63743705, -0.3972718, -0.13288058, -0.29779088, -0.30901298, -1.6760038, 1.1523316, 1.0796186, -0.81336427, -1.4664243, 0.6947491, -0.7255974, -1.383364, -1.5829384, 0.6103794, -1.1888592, -0.5068163, -0.596314, -0.052567296, -1.9362798, 0.1887786, 0.52389103, 0.08842209, -0.31088617, 0.097400166, 0.39904633, -2.7725928, 1.9559124, 0.39009333, -0.6524086, -0.39095336, 0.49374178, -0.11610394, -2.0306845, 2.064493, -0.11054066, 1.0201727, -0.69204986, 1.5363771, 0.2863437, 0.60884386, -1.0452534, 1.2111453, 0.68981814, 1.3018463, -0.6280876, -0.48102713, 2.3039167, -1.0600158, -0.1359497, 1.1368914, 0.09772497, 0.5829537, -0.39944902, 0.37005588, -0.4607198, -1.3342584, -1.3467175, 0.69377315, -0.15957344, -0.13370156, 1.0777438, -1.1268258, -0.7306777, -0.3848798, 0.09435159, -0.042171452, -0.2868872, -0.0616264, -0.10730527, -0.7196044, -0.812993, 0.27451634, -0.8909151, -1.1573553, -0.31229225, -0.15766701, 2.2567234, -0.7047003, 0.9432607, 0.7471883, -1.1889449, 0.77325296, -1.1838807, -2.6591723, 0.60631955, -1.7558906, 0.45093447, -0.6840109, 1.6595508, 1.0685093, -0.4533858, -0.6878376, -1.2140774, -0.44092262, -0.28035548, -0.36469355, 0.15670386, 0.5785215, 0.34965447, -0.52118933, -1.8430696, -0.477974, -0.4796558, 0.6203583, 0.6984571, 0.003770889, 0.93184835, 0.339965, -0.015682112, 0.16092817, -0.19065349, -0.3948495, -0.26773354, -1.1280113, 0.2804417, -0.9931236, 0.8416313, -0.24945858, 0.04949498, 0.4938368, 0.6433145, -1.5706234, -0.20690368, 0.8801789, -1.6981058, 0.38728046, -2.2555642, -1.0225068, 0.038630553, -1.6567152, -0.98551077, -1.471835, 1.648135, 0.16422775, 0.5672903, -0.2226751, -0.35343176, -1.6164742, -0.29183736, -0.7614922, 0.8579239, 1.1411018, 1.4665787, 0.85255194, 0.3554818, 0.8145198, 0.058925588, -0.18505368, -0.8076485, -1.4465348, 0.800298, -0.30911446, -0.23346666, 1.7327212, 0.6845011, 0.370825, 0.1420618, 1.5199949, 1.7195894, 0.9295051, 0.5822246, -2.094603, 0.12372191, -0.13010696, 0.09395323, 0.9430461, -2.7396772, -0.56931204, 0.26990435, -0.46684554, -1.4169061, 0.8689635, 0.27687192, -0.97110456, 0.3148172, 0.8215857, 0.005292646, 0.8005648, 0.078260176, -0.39522898, -1.1594205, -0.085930765, 0.19429293, 0.87583274, -0.11510747, 0.4574156, -0.964612, -0.78262913, -0.1103893, 2.0210435, -0.4688642, -2.2014413, 0.1993002, -0.050603542, -0.51751906, -0.97882986, -0.43918952, 0.18133843, -0.5028167, 2.4124537, -0.96050435, -0.79311734, -2.28862, 0.25148442, -2.0164065, -0.53945464, -0.27567053, -0.70972794, 1.7388726, 0.99439436, 1.3191369, -0.8824188, 1.128594, 0.49600095, 0.77140594, 1.0294389, -0.90876323, -0.42431763, 0.86259604, -2.6556191, 1.5133281, 0.55313206, -0.045703962, 0.22050765, -1.0299352, -0.34994337, 1.1002843, 1.298022, 2.696224, -0.07392467, -0.65855294, -0.51423395, -1.0180418, -0.07785475, -0.5812685, -1.6326345, -1.5677677, -1.179158, 1.3014281, 0.8952603, 1.3749641, -1.3322116, -1.9686247, -0.6600563, 0.17581895, 0.49869028, 1.0479722, 0.28427967, 1.7426687, -0.22260568, -0.9130792, -1.6812183, -0.8889713, 0.24211796, -0.8887203, 0.9367425, 1.4123276, -2.369587, 0.8640523, -2.239604, 0.40149906, 1.2248706, 0.064856105, -1.2796892, -0.5854312, -0.26164544, -0.18224478, -0.20289683, -0.10988278, 0.21348006, -1.2085737, -0.24201983, 1.5182612, -0.38464543, -0.4438361, 1.0781974, -2.5591846, 1.1813786, -0.63190377, 1.2978458, -2.364174, 0.020334182, -1.3479254, -0.7615734, 2.0112567, -0.044595428, 0.1950697, -1.7815628, -0.7290447, 0.1965574, 0.3547577, 0.61688656, 0.008627899, 0.5270042, 0.4537819, -1.8297404, 0.037005723, 0.76790243, 0.5898798, -0.36385882, -0.8056265, -1.1183119, -0.13105401, 1.1330799, -1.9518042, -0.6598917, -1.1398025, 0.7849575, -0.5543096, -0.47063765, -0.21694957, 0.44539326, -0.392389, -3.046143, 0.5433119, 0.43904296, -0.21954103, -1.0840366, 0.35178012, 0.37923554, -0.47003287, -0.21673147, -0.9301565, -0.17858909, -0.5900577, -0.110489406, -1.6606998, 0.115147874, -0.37914756, -1.7423562, -1.3032428, 0.60512006, 0.895556, -0.13190864, 0.40476182, 0.22384356, 0.32962298, 1.285984, -1.5069984, 0.67646074, -0.38200897, -0.22425893, -0.30224973, -0.3751471, -1.2261962, 0.1833392, 1.670943, -0.05613302, -0.0013850428, -0.687299, -0.11747455, 0.46616644, -0.37024245, -0.45380405, 0.40326455, -0.91800475, 0.25249663, 0.8203218, 1.3599485, -0.09038201, 1.3675972, 1.0344099, -0.99621266, -1.2179385, -0.30496365, 1.0289356, -0.07228701, -0.6006576, 1.5522432, 0.4497121, -0.067275606, -1.3183959, -0.370704, -0.94561577, -0.9327409, -1.2630683, 0.45248908, 0.097896144, -0.44816536, -0.64933795, -0.023423105, 1.0791948, -2.0042157, 0.37687653, -0.545712, -1.8845859, -1.945703, -0.9127835, 0.21950956, 0.39306292, -0.9389816, 1.017021, 1.4229835, 0.39608657, -0.59140265, 1.1244192, 0.7553957, 0.86740744, -0.6564637, -2.8345544, 2.116791, -1.6108783, -0.035768073, 2.3807454, 0.33057675, 0.94924647, -1.5023966, -1.7776669, -0.5327028, 1.0907497, -0.34624946, -0.7946363, 0.19796729, 1.0819352, 2.1321535, 0.9364457, -0.035095178, 1.2650778, 0.21149701, -0.70492136, 0.67997485, -0.6963267, -0.2903971, 1.3277828, -0.10128149, -0.8031414, -0.46433768, 1.0217906, -0.55254066, -0.38687086, -0.51029277, 0.1839255, -0.38548976, -1.6018361, -0.8871809, -0.932789, 1.2433194, 0.81267405, 0.58725935, -0.50535834, -0.81579155, -0.5075176, -1.0518801, 2.4972005, -2.2453218, 0.56400853, -1.2845523, -0.10434349, -0.98800194, -1.177629, -1.1401963, 1.7549862, -0.13298842, -0.7657022, 0.55578697, 0.010349315, 0.72003376, -1.8242567, 0.30360392, 0.82140595, 0.67057043, -0.7075057, 0.039766736, -1.5669947, -0.45130304, 0.26568797, 0.7231005, 0.024612125, 0.71998376, -1.1029062, -0.10169727, 0.019279385, 1.8495913, -0.21416666, -0.49901664, 0.021351224, -0.91911346, 0.19275385, -0.3650552, -1.7913276, -0.058586553, -0.3175431, -1.6324233, -0.06713416, 1.4893559, 0.5213038, 0.6119272, -1.3414967, 0.47689837, 0.14844958, 0.5290452, 0.4226286, -1.3597807, -0.041400813, -0.75787085, -0.050084095, -0.8974009, 1.3124703, -0.8589724, -0.8989422, 0.07458641, -1.0770991, -0.4246633, -0.8299646, 0.4052041, 0.49805242, -0.026192237, -1.68823, -0.112465985, -0.5324899, 0.6450553, 1.0118425, -0.65795106, 0.46838522, 1.735879, -0.66771275, 1.6819217, -0.85258585, 0.022959756, -0.011145612, 0.0114989, -0.837678, -0.5911831, -0.66772026, 0.3269626, 0.33003512, 2.2259443, 1.370989, -0.50984323, 0.3248696, 0.997118, 0.030601824, -0.069641575, 0.05157494, 0.8672766, -0.84832054, -0.32566947, 0.47043315, 0.31144708, 0.23958276, -0.36980116, 0.9725358, 2.1338682, 0.4064155, -0.1931767, 0.7557403, -0.53913265, -0.74969035, 0.032808747, -0.43674833, -1.6429653, -0.40607178, -0.53527015, 0.025405208, 1.154184, 0.17250441, 0.021062022, 0.099454455, 0.22739278, -1.0167387, -0.11477532, 0.30875126, -1.37076, 0.8656529, 1.0813761, -0.63137597, -0.24133779, -0.87819034, 0.69938046, -1.0612223, -0.222477, -0.8589199, 0.05095428, -1.7942293, 1.3264617, -0.9646064, 0.059894685, -0.21252304, -0.7621145, -0.88778013, 0.93639857, -0.5256406, 0.2711702, -0.80149686, -0.64718145, 0.47224715, 0.9304085, -0.17531641, -1.4219198, 1.997956, -0.8565493, -1.5415874, 2.5944245, -0.4040323, 1.8227236, -0.5215797, -1.1846865, 0.9606934, 1.3290628, -0.8174931, -1.4013473, 1.0304383, -2.0473237, -1.2266216, 0.96744615, -0.055352546, -0.26393735, 0.3528166, -0.15277442, -1.2986867, 1.2760754, 1.325014, 0.20533256, 0.045134015, 2.339625, -0.27643284, -0.25957698, 0.36448124, 1.471322, 1.5927707, -0.25857264, 0.30833125, -1.3780835, -0.3119761, -0.84029037, -1.0068318, 1.6815767, -0.79228663, -0.5316059, 0.36584878, 1.2978252, 0.48111513, 2.759355, -0.074667975, 0.25871643, 0.27560067, 1.4350494, 0.5072389, -0.1162297, 0.24614778, 0.86351967, -0.8047537, 2.346647, -1.2791611, -0.36555108, 0.9380925, 0.29673317, 0.82998616, -0.49610233, -0.074804984, 0.012231983, 1.5692596, 0.69042903, 0.7966721, -0.6579261, 0.9688826, 0.22558166, 1.3891454, 2.0140603, -0.30676576, -0.40630314, -0.86404496, -0.14357951, -0.38202545, 0.3595044, -0.14456682, -0.36159927, 1.0645851, -0.9378802, 0.43310794, -0.40594172, 0.7243685, 1.3852615, -0.30309826, 0.44103292, 0.17879286, -0.7994224, 0.2407875, 0.2891205, 0.41287082, -0.1983989, 0.0941923, -1.1476109, -0.35811406}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_slice_end_out_of_bounds_test.go b/backend/testbackend/onnx/onnx_test_slice_end_out_of_bounds_test.go new file mode 100644 index 00000000..9ec9e060 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_slice_end_out_of_bounds_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSliceEndOutOfBounds(t *testing.T) { + mytest := NewTestSliceEndOutOfBounds() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_slice_neg.go b/backend/testbackend/onnx/onnx_test_slice_neg.go new file mode 100644 index 00000000..e32ccd37 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_slice_neg.go @@ -0,0 +1,70 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("Slice", "TestSliceNeg", NewTestSliceNeg) +} + +// NewTestSliceNeg version: 4. +func NewTestSliceNeg() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "Slice", + Title: "TestSliceNeg", + ModelB: []byte{0x8, 0x4, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xbf, 0x1, 0xa, 0x28, 0xa, 0x1, 0x78, 0xa, 0x6, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0xa, 0x4, 0x65, 0x6e, 0x64, 0x73, 0xa, 0x4, 0x61, 0x78, 0x65, 0x73, 0xa, 0x5, 0x73, 0x74, 0x65, 0x70, 0x73, 0x12, 0x1, 0x79, 0x22, 0x5, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x12, 0xe, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x65, 0x67, 0x5a, 0x17, 0xa, 0x1, 0x78, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x14, 0xa, 0x2, 0x8, 0xa, 0xa, 0x2, 0x8, 0x5, 0x5a, 0x14, 0xa, 0x6, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x12, 0xa, 0x4, 0x65, 0x6e, 0x64, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x12, 0xa, 0x4, 0x61, 0x78, 0x65, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x5a, 0x13, 0xa, 0x5, 0x73, 0x74, 0x65, 0x70, 0x73, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x17, 0xa, 0x1, 0x79, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x14, 0xa, 0x2, 0x8, 0x9, 0xa, 0x2, 0x8, 0x5, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"x", "starts", "ends", "axes", "steps"}, + Output: []string{"y"}, + Name: "", + OpType: "Slice", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(20, 10, 5), + tensor.WithBacking([]float32{1.7640524, 0.4001572, 0.978738, 2.2408931, 1.867558, -0.9772779, 0.95008844, -0.1513572, -0.10321885, 0.41059852, 0.14404356, 1.4542735, 0.7610377, 0.121675014, 0.44386324, 0.33367434, 1.4940791, -0.20515826, 0.3130677, -0.85409576, -2.5529897, 0.6536186, 0.8644362, -0.742165, 2.2697546, -1.4543657, 0.045758516, -0.18718386, 1.5327792, 1.4693588, 0.15494743, 0.37816253, -0.88778573, -1.9807965, -0.34791216, 0.15634897, 1.2302907, 1.2023798, -0.3873268, -0.30230275, -1.048553, -1.420018, -1.7062702, 1.9507754, -0.5096522, -0.4380743, -1.2527953, 0.7774904, -1.6138978, -0.21274029, -0.89546657, 0.3869025, -0.51080513, -1.1806322, -0.028182229, 0.42833188, 0.06651722, 0.3024719, -0.6343221, -0.36274117, -0.67246044, -0.35955316, -0.8131463, -1.7262826, 0.17742614, -0.40178093, -1.6301984, 0.46278226, -0.9072984, 0.051945396, 0.7290906, 0.12898292, 1.1394007, -1.2348258, 0.40234163, -0.6848101, -0.87079716, -0.5788497, -0.31155252, 0.05616534, -1.1651498, 0.9008265, 0.46566245, -1.5362437, 1.4882522, 1.8958892, 1.1787796, -0.17992483, -1.0707526, 1.0544517, -0.40317693, 1.222445, 0.20827498, 0.97663903, 0.3563664, 0.7065732, 0.01050002, 1.7858706, 0.12691209, 0.40198937, 1.8831507, -1.347759, -1.270485, 0.9693967, -1.1731234, 1.9436212, -0.41361898, -0.7474548, 1.922942, 1.4805148, 1.867559, 0.90604466, -0.86122566, 1.9100649, -0.26800337, 0.8024564, 0.947252, -0.15501009, 0.61407936, 0.9222067, 0.37642553, -1.0994008, 0.2982382, 1.3263859, -0.69456786, -0.14963454, -0.43515354, 1.8492638, 0.67229474, 0.40746182, -0.76991606, 0.5392492, -0.6743327, 0.031830557, -0.6358461, 0.67643327, 0.57659084, -0.20829876, 0.3960067, -1.0930616, -1.4912575, 0.4393917, 0.1666735, 0.63503146, 2.3831449, 0.94447947, -0.91282225, 1.1170163, -1.3159074, -0.4615846, -0.0682416, 1.7133427, -0.74475485, -0.82643855, -0.09845252, -0.6634783, 1.1266359, -1.0799315, -1.1474687, -0.43782005, -0.49803245, 1.929532, 0.9494208, 0.08755124, -1.2254355, 0.844363, -1.0002153, -1.5447711, 1.1880298, 0.3169426, 0.9208588, 0.31872764, 0.8568306, -0.6510256, -1.0342429, 0.6815945, -0.80340964, -0.6895498, -0.4555325, 0.017479159, -0.35399392, -1.3749512, -0.6436184, -2.2234032, 0.62523144, -1.6020577, -1.1043833, 0.05216508, -0.739563, 1.5430146, -1.2928569, 0.26705086, -0.039282817, -1.1680934, 0.5232767, -0.17154633, 0.77179056, 0.82350415, 2.163236, 1.336528, -0.36918184, -0.23937918, 1.0996596, 0.6552637, 0.64013153, -1.616956, -0.024326125, -0.7380309, 0.2799246, -0.09815039, 0.9101789, 0.3172182, 0.78632796, -0.4664191, -0.94444627, -0.4100497, -0.017020414, 0.37915173, 2.259309, -0.042257152, -0.955945, -0.34598178, -0.463596, 0.48148146, -1.540797, 0.06326199, 0.15650654, 0.23218104, -0.5973161, -0.23792173, -1.424061, -0.49331987, -0.54286146, 0.41605005, -1.1561824, 0.7811981, 1.4944845, -2.069985, 0.42625874, 0.676908, -0.63743705, -0.3972718, -0.13288058, -0.29779088, -0.30901298, -1.6760038, 1.1523316, 1.0796186, -0.81336427, -1.4664243, 0.5210649, -0.57578796, 0.14195317, -0.31932843, 0.69153875, 0.6947491, -0.7255974, -1.383364, -1.5829384, 0.6103794, -1.1888592, -0.5068163, -0.596314, -0.052567296, -1.9362798, 0.1887786, 0.52389103, 0.08842209, -0.31088617, 0.097400166, 0.39904633, -2.7725928, 1.9559124, 0.39009333, -0.6524086, -0.39095336, 0.49374178, -0.11610394, -2.0306845, 2.064493, -0.11054066, 1.0201727, -0.69204986, 1.5363771, 0.2863437, 0.60884386, -1.0452534, 1.2111453, 0.68981814, 1.3018463, -0.6280876, -0.48102713, 2.3039167, -1.0600158, -0.1359497, 1.1368914, 0.09772497, 0.5829537, -0.39944902, 0.37005588, -1.3065269, 1.6581306, -0.11816405, -0.6801782, 0.6663831, -0.4607198, -1.3342584, -1.3467175, 0.69377315, -0.15957344, -0.13370156, 1.0777438, -1.1268258, -0.7306777, -0.3848798, 0.09435159, -0.042171452, -0.2868872, -0.0616264, -0.10730527, -0.7196044, -0.812993, 0.27451634, -0.8909151, -1.1573553, -0.31229225, -0.15766701, 2.2567234, -0.7047003, 0.9432607, 0.7471883, -1.1889449, 0.77325296, -1.1838807, -2.6591723, 0.60631955, -1.7558906, 0.45093447, -0.6840109, 1.6595508, 1.0685093, -0.4533858, -0.6878376, -1.2140774, -0.44092262, -0.28035548, -0.36469355, 0.15670386, 0.5785215, 0.34965447, -0.76414394, -1.4377915, 1.3645319, -0.6894492, -0.6522936, -0.52118933, -1.8430696, -0.477974, -0.4796558, 0.6203583, 0.6984571, 0.003770889, 0.93184835, 0.339965, -0.015682112, 0.16092817, -0.19065349, -0.3948495, -0.26773354, -1.1280113, 0.2804417, -0.9931236, 0.8416313, -0.24945858, 0.04949498, 0.4938368, 0.6433145, -1.5706234, -0.20690368, 0.8801789, -1.6981058, 0.38728046, -2.2555642, -1.0225068, 0.038630553, -1.6567152, -0.98551077, -1.471835, 1.648135, 0.16422775, 0.5672903, -0.2226751, -0.35343176, -1.6164742, -0.29183736, -0.7614922, 0.8579239, 1.1411018, 1.4665787, 0.85255194, -0.5986539, -1.1158969, 0.7666632, 0.3562928, -1.7685385, 0.3554818, 0.8145198, 0.058925588, -0.18505368, -0.8076485, -1.4465348, 0.800298, -0.30911446, -0.23346666, 1.7327212, 0.6845011, 0.370825, 0.1420618, 1.5199949, 1.7195894, 0.9295051, 0.5822246, -2.094603, 0.12372191, -0.13010696, 0.09395323, 0.9430461, -2.7396772, -0.56931204, 0.26990435, -0.46684554, -1.4169061, 0.8689635, 0.27687192, -0.97110456, 0.3148172, 0.8215857, 0.005292646, 0.8005648, 0.078260176, -0.39522898, -1.1594205, -0.085930765, 0.19429293, 0.87583274, -0.11510747, 0.4574156, -0.964612, -0.78262913, -0.1103893, -1.0546285, 0.8202478, 0.46313033, 0.27909577, 0.3389041, 2.0210435, -0.4688642, -2.2014413, 0.1993002, -0.050603542, -0.51751906, -0.97882986, -0.43918952, 0.18133843, -0.5028167, 2.4124537, -0.96050435, -0.79311734, -2.28862, 0.25148442, -2.0164065, -0.53945464, -0.27567053, -0.70972794, 1.7388726, 0.99439436, 1.3191369, -0.8824188, 1.128594, 0.49600095, 0.77140594, 1.0294389, -0.90876323, -0.42431763, 0.86259604, -2.6556191, 1.5133281, 0.55313206, -0.045703962, 0.22050765, -1.0299352, -0.34994337, 1.1002843, 1.298022, 2.696224, -0.07392467, -0.65855294, -0.51423395, -1.0180418, -0.07785475, 0.38273242, -0.03424228, 1.0963469, -0.2342158, -0.34745064, -0.5812685, -1.6326345, -1.5677677, -1.179158, 1.3014281, 0.8952603, 1.3749641, -1.3322116, -1.9686247, -0.6600563, 0.17581895, 0.49869028, 1.0479722, 0.28427967, 1.7426687, -0.22260568, -0.9130792, -1.6812183, -0.8889713, 0.24211796, -0.8887203, 0.9367425, 1.4123276, -2.369587, 0.8640523, -2.239604, 0.40149906, 1.2248706, 0.064856105, -1.2796892, -0.5854312, -0.26164544, -0.18224478, -0.20289683, -0.10988278, 0.21348006, -1.2085737, -0.24201983, 1.5182612, -0.38464543, -0.4438361, 1.0781974, -2.5591846, 1.1813786, -0.63190377, 0.16392857, 0.09632136, 0.9424681, -0.26759475, -0.6780258, 1.2978458, -2.364174, 0.020334182, -1.3479254, -0.7615734, 2.0112567, -0.044595428, 0.1950697, -1.7815628, -0.7290447, 0.1965574, 0.3547577, 0.61688656, 0.008627899, 0.5270042, 0.4537819, -1.8297404, 0.037005723, 0.76790243, 0.5898798, -0.36385882, -0.8056265, -1.1183119, -0.13105401, 1.1330799, -1.9518042, -0.6598917, -1.1398025, 0.7849575, -0.5543096, -0.47063765, -0.21694957, 0.44539326, -0.392389, -3.046143, 0.5433119, 0.43904296, -0.21954103, -1.0840366, 0.35178012, 0.37923554, -0.47003287, -0.21673147, -0.9301565, -0.17858909, -1.5504293, 0.41731882, -0.9443685, 0.23810315, -1.405963, -0.5900577, -0.110489406, -1.6606998, 0.115147874, -0.37914756, -1.7423562, -1.3032428, 0.60512006, 0.895556, -0.13190864, 0.40476182, 0.22384356, 0.32962298, 1.285984, -1.5069984, 0.67646074, -0.38200897, -0.22425893, -0.30224973, -0.3751471, -1.2261962, 0.1833392, 1.670943, -0.05613302, -0.0013850428, -0.687299, -0.11747455, 0.46616644, -0.37024245, -0.45380405, 0.40326455, -0.91800475, 0.25249663, 0.8203218, 1.3599485, -0.09038201, 1.3675972, 1.0344099, -0.99621266, -1.2179385, -0.30496365, 1.0289356, -0.07228701, -0.6006576, 1.5522432, 0.28690448, -2.3205943, 0.31716064, 0.52004063, 0.22560866, 0.4497121, -0.067275606, -1.3183959, -0.370704, -0.94561577, -0.9327409, -1.2630683, 0.45248908, 0.097896144, -0.44816536, -0.64933795, -0.023423105, 1.0791948, -2.0042157, 0.37687653, -0.545712, -1.8845859, -1.945703, -0.9127835, 0.21950956, 0.39306292, -0.9389816, 1.017021, 1.4229835, 0.39608657, -0.59140265, 1.1244192, 0.7553957, 0.86740744, -0.6564637, -2.8345544, 2.116791, -1.6108783, -0.035768073, 2.3807454, 0.33057675, 0.94924647, -1.5023966, -1.7776669, -0.5327028, 1.0907497, -0.34624946, -0.7946363, 0.19796729, 1.0819352, -1.4449402, -1.210543, -0.7886692, 1.0946383, 0.23482153, 2.1321535, 0.9364457, -0.035095178, 1.2650778, 0.21149701, -0.70492136, 0.67997485, -0.6963267, -0.2903971, 1.3277828, -0.10128149, -0.8031414, -0.46433768, 1.0217906, -0.55254066, -0.38687086, -0.51029277, 0.1839255, -0.38548976, -1.6018361, -0.8871809, -0.932789, 1.2433194, 0.81267405, 0.58725935, -0.50535834, -0.81579155, -0.5075176, -1.0518801, 2.4972005, -2.2453218, 0.56400853, -1.2845523, -0.10434349, -0.98800194, -1.177629, -1.1401963, 1.7549862, -0.13298842, -0.7657022, 0.55578697, 0.010349315, 0.72003376, -1.8242567, 0.30360392, 0.7726948, -1.6615983, 0.44819528, 1.6961815, -0.014857704, 0.82140595, 0.67057043, -0.7075057, 0.039766736, -1.5669947, -0.45130304, 0.26568797, 0.7231005, 0.024612125, 0.71998376, -1.1029062, -0.10169727, 0.019279385, 1.8495913, -0.21416666, -0.49901664, 0.021351224, -0.91911346, 0.19275385, -0.3650552, -1.7913276, -0.058586553, -0.3175431, -1.6324233, -0.06713416, 1.4893559, 0.5213038, 0.6119272, -1.3414967, 0.47689837, 0.14844958, 0.5290452, 0.4226286, -1.3597807, -0.041400813, -0.75787085, -0.050084095, -0.8974009, 1.3124703, -0.8589724, -0.8989422, 0.07458641, -1.0770991, -0.4246633, -0.8299646, 1.411172, 0.78580385, -0.057469517, -0.39121705, 0.9409176, 0.4052041, 0.49805242, -0.026192237, -1.68823, -0.112465985, -0.5324899, 0.6450553, 1.0118425, -0.65795106, 0.46838522, 1.735879, -0.66771275, 1.6819217, -0.85258585, 0.022959756, -0.011145612, 0.0114989, -0.837678, -0.5911831, -0.66772026, 0.3269626, 0.33003512, 2.2259443, 1.370989, -0.50984323, 0.3248696, 0.997118, 0.030601824, -0.069641575, 0.05157494, 0.8672766, -0.84832054, -0.32566947, 0.47043315, 0.31144708, 0.23958276, -0.36980116, 0.9725358, 2.1338682, 0.4064155, -0.1931767, 0.7557403, -0.53913265, -0.74969035, 0.032808747, -2.5827966, -1.1539503, -0.34796184, -1.3533889, -1.0326431, -0.43674833, -1.6429653, -0.40607178, -0.53527015, 0.025405208, 1.154184, 0.17250441, 0.021062022, 0.099454455, 0.22739278, -1.0167387, -0.11477532, 0.30875126, -1.37076, 0.8656529, 1.0813761, -0.63137597, -0.24133779, -0.87819034, 0.69938046, -1.0612223, -0.222477, -0.8589199, 0.05095428, -1.7942293, 1.3264617, -0.9646064, 0.059894685, -0.21252304, -0.7621145, -0.88778013, 0.93639857, -0.5256406, 0.2711702, -0.80149686, -0.64718145, 0.47224715, 0.9304085, -0.17531641, -1.4219198, 1.997956, -0.8565493, -1.5415874, 2.5944245, -0.4040323, -1.4617327, -0.6834398, 0.3675449, 0.19031155, -0.8517292, 1.8227236, -0.5215797, -1.1846865, 0.9606934, 1.3290628, -0.8174931, -1.4013473, 1.0304383, -2.0473237, -1.2266216, 0.96744615, -0.055352546, -0.26393735, 0.3528166, -0.15277442, -1.2986867, 1.2760754, 1.325014, 0.20533256, 0.045134015, 2.339625, -0.27643284, -0.25957698, 0.36448124, 1.471322, 1.5927707, -0.25857264, 0.30833125, -1.3780835, -0.3119761, -0.84029037, -1.0068318, 1.6815767, -0.79228663, -0.5316059, 0.36584878, 1.2978252, 0.48111513, 2.759355, -0.074667975, 0.25871643, 0.27560067, 1.4350494, 0.5072389, -0.1162297, -0.9474886, 0.24444346, 1.4013448, -0.4103818, 0.5289436, 0.24614778, 0.86351967, -0.8047537, 2.346647, -1.2791611, -0.36555108, 0.9380925, 0.29673317, 0.82998616, -0.49610233, -0.074804984, 0.012231983, 1.5692596, 0.69042903, 0.7966721, -0.6579261, 0.9688826, 0.22558166, 1.3891454, 2.0140603, -0.30676576, -0.40630314, -0.86404496, -0.14357951, -0.38202545, 0.3595044, -0.14456682, -0.36159927, 1.0645851, -0.9378802, 0.43310794, -0.40594172, 0.7243685, 1.3852615, -0.30309826, 0.44103292, 0.17879286, -0.7994224, 0.2407875, 0.2891205, 0.41287082, -0.1983989, 0.0941923, -1.1476109, -0.35811406}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{0}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{-1}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{1}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{1}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(20, 9, 5), + tensor.WithBacking([]float32{1.7640524, 0.4001572, 0.978738, 2.2408931, 1.867558, -0.9772779, 0.95008844, -0.1513572, -0.10321885, 0.41059852, 0.14404356, 1.4542735, 0.7610377, 0.121675014, 0.44386324, 0.33367434, 1.4940791, -0.20515826, 0.3130677, -0.85409576, -2.5529897, 0.6536186, 0.8644362, -0.742165, 2.2697546, -1.4543657, 0.045758516, -0.18718386, 1.5327792, 1.4693588, 0.15494743, 0.37816253, -0.88778573, -1.9807965, -0.34791216, 0.15634897, 1.2302907, 1.2023798, -0.3873268, -0.30230275, -1.048553, -1.420018, -1.7062702, 1.9507754, -0.5096522, -0.89546657, 0.3869025, -0.51080513, -1.1806322, -0.028182229, 0.42833188, 0.06651722, 0.3024719, -0.6343221, -0.36274117, -0.67246044, -0.35955316, -0.8131463, -1.7262826, 0.17742614, -0.40178093, -1.6301984, 0.46278226, -0.9072984, 0.051945396, 0.7290906, 0.12898292, 1.1394007, -1.2348258, 0.40234163, -0.6848101, -0.87079716, -0.5788497, -0.31155252, 0.05616534, -1.1651498, 0.9008265, 0.46566245, -1.5362437, 1.4882522, 1.8958892, 1.1787796, -0.17992483, -1.0707526, 1.0544517, -0.40317693, 1.222445, 0.20827498, 0.97663903, 0.3563664, 1.8831507, -1.347759, -1.270485, 0.9693967, -1.1731234, 1.9436212, -0.41361898, -0.7474548, 1.922942, 1.4805148, 1.867559, 0.90604466, -0.86122566, 1.9100649, -0.26800337, 0.8024564, 0.947252, -0.15501009, 0.61407936, 0.9222067, 0.37642553, -1.0994008, 0.2982382, 1.3263859, -0.69456786, -0.14963454, -0.43515354, 1.8492638, 0.67229474, 0.40746182, -0.76991606, 0.5392492, -0.6743327, 0.031830557, -0.6358461, 0.67643327, 0.57659084, -0.20829876, 0.3960067, -1.0930616, -1.4912575, 0.4393917, 0.1666735, 0.63503146, 2.3831449, -0.0682416, 1.7133427, -0.74475485, -0.82643855, -0.09845252, -0.6634783, 1.1266359, -1.0799315, -1.1474687, -0.43782005, -0.49803245, 1.929532, 0.9494208, 0.08755124, -1.2254355, 0.844363, -1.0002153, -1.5447711, 1.1880298, 0.3169426, 0.9208588, 0.31872764, 0.8568306, -0.6510256, -1.0342429, 0.6815945, -0.80340964, -0.6895498, -0.4555325, 0.017479159, -0.35399392, -1.3749512, -0.6436184, -2.2234032, 0.62523144, -1.6020577, -1.1043833, 0.05216508, -0.739563, 1.5430146, -1.2928569, 0.26705086, -0.039282817, -1.1680934, 0.5232767, -0.36918184, -0.23937918, 1.0996596, 0.6552637, 0.64013153, -1.616956, -0.024326125, -0.7380309, 0.2799246, -0.09815039, 0.9101789, 0.3172182, 0.78632796, -0.4664191, -0.94444627, -0.4100497, -0.017020414, 0.37915173, 2.259309, -0.042257152, -0.955945, -0.34598178, -0.463596, 0.48148146, -1.540797, 0.06326199, 0.15650654, 0.23218104, -0.5973161, -0.23792173, -1.424061, -0.49331987, -0.54286146, 0.41605005, -1.1561824, 0.7811981, 1.4944845, -2.069985, 0.42625874, 0.676908, -0.63743705, -0.3972718, -0.13288058, -0.29779088, -0.30901298, 0.5210649, -0.57578796, 0.14195317, -0.31932843, 0.69153875, 0.6947491, -0.7255974, -1.383364, -1.5829384, 0.6103794, -1.1888592, -0.5068163, -0.596314, -0.052567296, -1.9362798, 0.1887786, 0.52389103, 0.08842209, -0.31088617, 0.097400166, 0.39904633, -2.7725928, 1.9559124, 0.39009333, -0.6524086, -0.39095336, 0.49374178, -0.11610394, -2.0306845, 2.064493, -0.11054066, 1.0201727, -0.69204986, 1.5363771, 0.2863437, 0.60884386, -1.0452534, 1.2111453, 0.68981814, 1.3018463, -0.6280876, -0.48102713, 2.3039167, -1.0600158, -0.1359497, -1.3065269, 1.6581306, -0.11816405, -0.6801782, 0.6663831, -0.4607198, -1.3342584, -1.3467175, 0.69377315, -0.15957344, -0.13370156, 1.0777438, -1.1268258, -0.7306777, -0.3848798, 0.09435159, -0.042171452, -0.2868872, -0.0616264, -0.10730527, -0.7196044, -0.812993, 0.27451634, -0.8909151, -1.1573553, -0.31229225, -0.15766701, 2.2567234, -0.7047003, 0.9432607, 0.7471883, -1.1889449, 0.77325296, -1.1838807, -2.6591723, 0.60631955, -1.7558906, 0.45093447, -0.6840109, 1.6595508, 1.0685093, -0.4533858, -0.6878376, -1.2140774, -0.44092262, -0.76414394, -1.4377915, 1.3645319, -0.6894492, -0.6522936, -0.52118933, -1.8430696, -0.477974, -0.4796558, 0.6203583, 0.6984571, 0.003770889, 0.93184835, 0.339965, -0.015682112, 0.16092817, -0.19065349, -0.3948495, -0.26773354, -1.1280113, 0.2804417, -0.9931236, 0.8416313, -0.24945858, 0.04949498, 0.4938368, 0.6433145, -1.5706234, -0.20690368, 0.8801789, -1.6981058, 0.38728046, -2.2555642, -1.0225068, 0.038630553, -1.6567152, -0.98551077, -1.471835, 1.648135, 0.16422775, 0.5672903, -0.2226751, -0.35343176, -1.6164742, -0.29183736, -0.5986539, -1.1158969, 0.7666632, 0.3562928, -1.7685385, 0.3554818, 0.8145198, 0.058925588, -0.18505368, -0.8076485, -1.4465348, 0.800298, -0.30911446, -0.23346666, 1.7327212, 0.6845011, 0.370825, 0.1420618, 1.5199949, 1.7195894, 0.9295051, 0.5822246, -2.094603, 0.12372191, -0.13010696, 0.09395323, 0.9430461, -2.7396772, -0.56931204, 0.26990435, -0.46684554, -1.4169061, 0.8689635, 0.27687192, -0.97110456, 0.3148172, 0.8215857, 0.005292646, 0.8005648, 0.078260176, -0.39522898, -1.1594205, -0.085930765, 0.19429293, 0.87583274, -1.0546285, 0.8202478, 0.46313033, 0.27909577, 0.3389041, 2.0210435, -0.4688642, -2.2014413, 0.1993002, -0.050603542, -0.51751906, -0.97882986, -0.43918952, 0.18133843, -0.5028167, 2.4124537, -0.96050435, -0.79311734, -2.28862, 0.25148442, -2.0164065, -0.53945464, -0.27567053, -0.70972794, 1.7388726, 0.99439436, 1.3191369, -0.8824188, 1.128594, 0.49600095, 0.77140594, 1.0294389, -0.90876323, -0.42431763, 0.86259604, -2.6556191, 1.5133281, 0.55313206, -0.045703962, 0.22050765, -1.0299352, -0.34994337, 1.1002843, 1.298022, 2.696224, 0.38273242, -0.03424228, 1.0963469, -0.2342158, -0.34745064, -0.5812685, -1.6326345, -1.5677677, -1.179158, 1.3014281, 0.8952603, 1.3749641, -1.3322116, -1.9686247, -0.6600563, 0.17581895, 0.49869028, 1.0479722, 0.28427967, 1.7426687, -0.22260568, -0.9130792, -1.6812183, -0.8889713, 0.24211796, -0.8887203, 0.9367425, 1.4123276, -2.369587, 0.8640523, -2.239604, 0.40149906, 1.2248706, 0.064856105, -1.2796892, -0.5854312, -0.26164544, -0.18224478, -0.20289683, -0.10988278, 0.21348006, -1.2085737, -0.24201983, 1.5182612, -0.38464543, 0.16392857, 0.09632136, 0.9424681, -0.26759475, -0.6780258, 1.2978458, -2.364174, 0.020334182, -1.3479254, -0.7615734, 2.0112567, -0.044595428, 0.1950697, -1.7815628, -0.7290447, 0.1965574, 0.3547577, 0.61688656, 0.008627899, 0.5270042, 0.4537819, -1.8297404, 0.037005723, 0.76790243, 0.5898798, -0.36385882, -0.8056265, -1.1183119, -0.13105401, 1.1330799, -1.9518042, -0.6598917, -1.1398025, 0.7849575, -0.5543096, -0.47063765, -0.21694957, 0.44539326, -0.392389, -3.046143, 0.5433119, 0.43904296, -0.21954103, -1.0840366, 0.35178012, -1.5504293, 0.41731882, -0.9443685, 0.23810315, -1.405963, -0.5900577, -0.110489406, -1.6606998, 0.115147874, -0.37914756, -1.7423562, -1.3032428, 0.60512006, 0.895556, -0.13190864, 0.40476182, 0.22384356, 0.32962298, 1.285984, -1.5069984, 0.67646074, -0.38200897, -0.22425893, -0.30224973, -0.3751471, -1.2261962, 0.1833392, 1.670943, -0.05613302, -0.0013850428, -0.687299, -0.11747455, 0.46616644, -0.37024245, -0.45380405, 0.40326455, -0.91800475, 0.25249663, 0.8203218, 1.3599485, -0.09038201, 1.3675972, 1.0344099, -0.99621266, -1.2179385, 0.28690448, -2.3205943, 0.31716064, 0.52004063, 0.22560866, 0.4497121, -0.067275606, -1.3183959, -0.370704, -0.94561577, -0.9327409, -1.2630683, 0.45248908, 0.097896144, -0.44816536, -0.64933795, -0.023423105, 1.0791948, -2.0042157, 0.37687653, -0.545712, -1.8845859, -1.945703, -0.9127835, 0.21950956, 0.39306292, -0.9389816, 1.017021, 1.4229835, 0.39608657, -0.59140265, 1.1244192, 0.7553957, 0.86740744, -0.6564637, -2.8345544, 2.116791, -1.6108783, -0.035768073, 2.3807454, 0.33057675, 0.94924647, -1.5023966, -1.7776669, -0.5327028, -1.4449402, -1.210543, -0.7886692, 1.0946383, 0.23482153, 2.1321535, 0.9364457, -0.035095178, 1.2650778, 0.21149701, -0.70492136, 0.67997485, -0.6963267, -0.2903971, 1.3277828, -0.10128149, -0.8031414, -0.46433768, 1.0217906, -0.55254066, -0.38687086, -0.51029277, 0.1839255, -0.38548976, -1.6018361, -0.8871809, -0.932789, 1.2433194, 0.81267405, 0.58725935, -0.50535834, -0.81579155, -0.5075176, -1.0518801, 2.4972005, -2.2453218, 0.56400853, -1.2845523, -0.10434349, -0.98800194, -1.177629, -1.1401963, 1.7549862, -0.13298842, -0.7657022, 0.7726948, -1.6615983, 0.44819528, 1.6961815, -0.014857704, 0.82140595, 0.67057043, -0.7075057, 0.039766736, -1.5669947, -0.45130304, 0.26568797, 0.7231005, 0.024612125, 0.71998376, -1.1029062, -0.10169727, 0.019279385, 1.8495913, -0.21416666, -0.49901664, 0.021351224, -0.91911346, 0.19275385, -0.3650552, -1.7913276, -0.058586553, -0.3175431, -1.6324233, -0.06713416, 1.4893559, 0.5213038, 0.6119272, -1.3414967, 0.47689837, 0.14844958, 0.5290452, 0.4226286, -1.3597807, -0.041400813, -0.75787085, -0.050084095, -0.8974009, 1.3124703, -0.8589724, 1.411172, 0.78580385, -0.057469517, -0.39121705, 0.9409176, 0.4052041, 0.49805242, -0.026192237, -1.68823, -0.112465985, -0.5324899, 0.6450553, 1.0118425, -0.65795106, 0.46838522, 1.735879, -0.66771275, 1.6819217, -0.85258585, 0.022959756, -0.011145612, 0.0114989, -0.837678, -0.5911831, -0.66772026, 0.3269626, 0.33003512, 2.2259443, 1.370989, -0.50984323, 0.3248696, 0.997118, 0.030601824, -0.069641575, 0.05157494, 0.8672766, -0.84832054, -0.32566947, 0.47043315, 0.31144708, 0.23958276, -0.36980116, 0.9725358, 2.1338682, 0.4064155, -2.5827966, -1.1539503, -0.34796184, -1.3533889, -1.0326431, -0.43674833, -1.6429653, -0.40607178, -0.53527015, 0.025405208, 1.154184, 0.17250441, 0.021062022, 0.099454455, 0.22739278, -1.0167387, -0.11477532, 0.30875126, -1.37076, 0.8656529, 1.0813761, -0.63137597, -0.24133779, -0.87819034, 0.69938046, -1.0612223, -0.222477, -0.8589199, 0.05095428, -1.7942293, 1.3264617, -0.9646064, 0.059894685, -0.21252304, -0.7621145, -0.88778013, 0.93639857, -0.5256406, 0.2711702, -0.80149686, -0.64718145, 0.47224715, 0.9304085, -0.17531641, -1.4219198, -1.4617327, -0.6834398, 0.3675449, 0.19031155, -0.8517292, 1.8227236, -0.5215797, -1.1846865, 0.9606934, 1.3290628, -0.8174931, -1.4013473, 1.0304383, -2.0473237, -1.2266216, 0.96744615, -0.055352546, -0.26393735, 0.3528166, -0.15277442, -1.2986867, 1.2760754, 1.325014, 0.20533256, 0.045134015, 2.339625, -0.27643284, -0.25957698, 0.36448124, 1.471322, 1.5927707, -0.25857264, 0.30833125, -1.3780835, -0.3119761, -0.84029037, -1.0068318, 1.6815767, -0.79228663, -0.5316059, 0.36584878, 1.2978252, 0.48111513, 2.759355, -0.074667975, -0.9474886, 0.24444346, 1.4013448, -0.4103818, 0.5289436, 0.24614778, 0.86351967, -0.8047537, 2.346647, -1.2791611, -0.36555108, 0.9380925, 0.29673317, 0.82998616, -0.49610233, -0.074804984, 0.012231983, 1.5692596, 0.69042903, 0.7966721, -0.6579261, 0.9688826, 0.22558166, 1.3891454, 2.0140603, -0.30676576, -0.40630314, -0.86404496, -0.14357951, -0.38202545, 0.3595044, -0.14456682, -0.36159927, 1.0645851, -0.9378802, 0.43310794, -0.40594172, 0.7243685, 1.3852615, -0.30309826, 0.44103292, 0.17879286, -0.7994224, 0.2407875, 0.2891205}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_slice_neg_steps_test.go b/backend/testbackend/onnx/onnx_test_slice_neg_steps_test.go new file mode 100644 index 00000000..e6def1af --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_slice_neg_steps_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSliceNegSteps(t *testing.T) { + mytest := NewTestSliceNegSteps() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_slice_neg_test.go b/backend/testbackend/onnx/onnx_test_slice_neg_test.go new file mode 100644 index 00000000..0056b867 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_slice_neg_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSliceNeg(t *testing.T) { + mytest := NewTestSliceNeg() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_slice_test.go b/backend/testbackend/onnx/onnx_test_slice_test.go new file mode 100644 index 00000000..b6ca4417 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_slice_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSlice(t *testing.T) { + mytest := NewTestSlice() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_softmax_axis_0.go b/backend/testbackend/onnx/onnx_test_softmax_axis_0.go index c15aee91..88d5d9bc 100644 --- a/backend/testbackend/onnx/onnx_test_softmax_axis_0.go +++ b/backend/testbackend/onnx/onnx_test_softmax_axis_0.go @@ -26,7 +26,7 @@ func NewTestSoftmaxAxis0() *testbackend.TestCase { Name: "", OpType: "Softmax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011c100)(name:"axis" type:INT ) + (*pb.AttributeProto)(0xc000126000)(name:"axis" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_softmax_axis_0_test.go b/backend/testbackend/onnx/onnx_test_softmax_axis_0_test.go new file mode 100644 index 00000000..7e399a1f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_softmax_axis_0_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSoftmaxAxis0(t *testing.T) { + mytest := NewTestSoftmaxAxis0() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_softmax_axis_1.go b/backend/testbackend/onnx/onnx_test_softmax_axis_1.go index 6886063d..e8ad113c 100644 --- a/backend/testbackend/onnx/onnx_test_softmax_axis_1.go +++ b/backend/testbackend/onnx/onnx_test_softmax_axis_1.go @@ -26,7 +26,7 @@ func NewTestSoftmaxAxis1() *testbackend.TestCase { Name: "", OpType: "Softmax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013c800)(name:"axis" type:INT i:1 ) + (*pb.AttributeProto)(0xc000126100)(name:"axis" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_softmax_axis_1_test.go b/backend/testbackend/onnx/onnx_test_softmax_axis_1_test.go new file mode 100644 index 00000000..1a380b4c --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_softmax_axis_1_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSoftmaxAxis1(t *testing.T) { + mytest := NewTestSoftmaxAxis1() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_softmax_axis_2.go b/backend/testbackend/onnx/onnx_test_softmax_axis_2.go index b6584b87..f274ae3b 100644 --- a/backend/testbackend/onnx/onnx_test_softmax_axis_2.go +++ b/backend/testbackend/onnx/onnx_test_softmax_axis_2.go @@ -26,7 +26,7 @@ func NewTestSoftmaxAxis2() *testbackend.TestCase { Name: "", OpType: "Softmax", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013cd00)(name:"axis" type:INT i:2 ) + (*pb.AttributeProto)(0xc000126800)(name:"axis" type:INT i:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_softmax_axis_2_test.go b/backend/testbackend/onnx/onnx_test_softmax_axis_2_test.go new file mode 100644 index 00000000..c95f400e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_softmax_axis_2_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSoftmaxAxis2(t *testing.T) { + mytest := NewTestSoftmaxAxis2() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_softmax_default_axis_test.go b/backend/testbackend/onnx/onnx_test_softmax_default_axis_test.go new file mode 100644 index 00000000..b07ba07a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_softmax_default_axis_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSoftmaxDefaultAxis(t *testing.T) { + mytest := NewTestSoftmaxDefaultAxis() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_softmax_example_test.go b/backend/testbackend/onnx/onnx_test_softmax_example_test.go new file mode 100644 index 00000000..09ecbf33 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_softmax_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSoftmaxExample(t *testing.T) { + mytest := NewTestSoftmaxExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_softmax_large_number_test.go b/backend/testbackend/onnx/onnx_test_softmax_large_number_test.go new file mode 100644 index 00000000..39b44ada --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_softmax_large_number_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSoftmaxLargeNumber(t *testing.T) { + mytest := NewTestSoftmaxLargeNumber() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_softplus_example_test.go b/backend/testbackend/onnx/onnx_test_softplus_example_test.go new file mode 100644 index 00000000..c6a54258 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_softplus_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSoftplusExample(t *testing.T) { + mytest := NewTestSoftplusExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_softplus_test.go b/backend/testbackend/onnx/onnx_test_softplus_test.go new file mode 100644 index 00000000..bdac609b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_softplus_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSoftplus(t *testing.T) { + mytest := NewTestSoftplus() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_softsign_example_test.go b/backend/testbackend/onnx/onnx_test_softsign_example_test.go new file mode 100644 index 00000000..c2e33004 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_softsign_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSoftsignExample(t *testing.T) { + mytest := NewTestSoftsignExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_softsign_test.go b/backend/testbackend/onnx/onnx_test_softsign_test.go new file mode 100644 index 00000000..c34abd69 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_softsign_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSoftsign(t *testing.T) { + mytest := NewTestSoftsign() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_split_equal_parts_1d.go b/backend/testbackend/onnx/onnx_test_split_equal_parts_1d.go index 4bce130b..75cc3b12 100644 --- a/backend/testbackend/onnx/onnx_test_split_equal_parts_1d.go +++ b/backend/testbackend/onnx/onnx_test_split_equal_parts_1d.go @@ -26,7 +26,7 @@ func NewTestSplitEqualParts1d() *testbackend.TestCase { Name: "", OpType: "Split", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013d100)(name:"axis" type:INT ) + (*pb.AttributeProto)(0xc000127700)(name:"axis" type:INT ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_split_equal_parts_1d_test.go b/backend/testbackend/onnx/onnx_test_split_equal_parts_1d_test.go new file mode 100644 index 00000000..0674f7da --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_split_equal_parts_1d_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSplitEqualParts1d(t *testing.T) { + mytest := NewTestSplitEqualParts1d() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_split_equal_parts_2d.go b/backend/testbackend/onnx/onnx_test_split_equal_parts_2d.go index cf93b39e..11c1c0c5 100644 --- a/backend/testbackend/onnx/onnx_test_split_equal_parts_2d.go +++ b/backend/testbackend/onnx/onnx_test_split_equal_parts_2d.go @@ -26,7 +26,7 @@ func NewTestSplitEqualParts2d() *testbackend.TestCase { Name: "", OpType: "Split", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011cd00)(name:"axis" type:INT i:1 ) + (*pb.AttributeProto)(0xc000118300)(name:"axis" type:INT i:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_split_equal_parts_2d_test.go b/backend/testbackend/onnx/onnx_test_split_equal_parts_2d_test.go new file mode 100644 index 00000000..d5bf8ead --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_split_equal_parts_2d_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSplitEqualParts2d(t *testing.T) { + mytest := NewTestSplitEqualParts2d() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_split_equal_parts_default_axis_test.go b/backend/testbackend/onnx/onnx_test_split_equal_parts_default_axis_test.go new file mode 100644 index 00000000..7ca1c8a0 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_split_equal_parts_default_axis_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSplitEqualPartsDefaultAxis(t *testing.T) { + mytest := NewTestSplitEqualPartsDefaultAxis() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_split_variable_parts_1d.go b/backend/testbackend/onnx/onnx_test_split_variable_parts_1d.go index 6a72fbe6..a96efb92 100644 --- a/backend/testbackend/onnx/onnx_test_split_variable_parts_1d.go +++ b/backend/testbackend/onnx/onnx_test_split_variable_parts_1d.go @@ -26,8 +26,8 @@ func NewTestSplitVariableParts1d() *testbackend.TestCase { Name: "", OpType: "Split", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011d100)(name:"axis" type:INT ), - (*pb.AttributeProto)(0xc00011d200)(name:"split" type:INTS ints:2 ints:4 ) + (*pb.AttributeProto)(0xc000118d00)(name:"axis" type:INT ), + (*pb.AttributeProto)(0xc000118e00)(name:"split" type:INTS ints:2 ints:4 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_split_variable_parts_1d_test.go b/backend/testbackend/onnx/onnx_test_split_variable_parts_1d_test.go new file mode 100644 index 00000000..b1c2fd6a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_split_variable_parts_1d_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSplitVariableParts1d(t *testing.T) { + mytest := NewTestSplitVariableParts1d() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_split_variable_parts_2d.go b/backend/testbackend/onnx/onnx_test_split_variable_parts_2d.go index bc0674c2..368099df 100644 --- a/backend/testbackend/onnx/onnx_test_split_variable_parts_2d.go +++ b/backend/testbackend/onnx/onnx_test_split_variable_parts_2d.go @@ -26,8 +26,8 @@ func NewTestSplitVariableParts2d() *testbackend.TestCase { Name: "", OpType: "Split", Attributes: ([]*pb.AttributeProto) (len=2 cap=2) { - (*pb.AttributeProto)(0xc00011d300)(name:"axis" type:INT i:1 ), - (*pb.AttributeProto)(0xc00011d400)(name:"split" type:INTS ints:2 ints:4 ) + (*pb.AttributeProto)(0xc000126600)(name:"axis" type:INT i:1 ), + (*pb.AttributeProto)(0xc000126700)(name:"split" type:INTS ints:2 ints:4 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_split_variable_parts_2d_test.go b/backend/testbackend/onnx/onnx_test_split_variable_parts_2d_test.go new file mode 100644 index 00000000..9a1c03b4 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_split_variable_parts_2d_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSplitVariableParts2d(t *testing.T) { + mytest := NewTestSplitVariableParts2d() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_split_variable_parts_default_axis.go b/backend/testbackend/onnx/onnx_test_split_variable_parts_default_axis.go index b8a245d8..49ccdd5a 100644 --- a/backend/testbackend/onnx/onnx_test_split_variable_parts_default_axis.go +++ b/backend/testbackend/onnx/onnx_test_split_variable_parts_default_axis.go @@ -26,7 +26,7 @@ func NewTestSplitVariablePartsDefaultAxis() *testbackend.TestCase { Name: "", OpType: "Split", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011d500)(name:"split" type:INTS ints:2 ints:4 ) + (*pb.AttributeProto)(0xc000119500)(name:"split" type:INTS ints:2 ints:4 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_split_variable_parts_default_axis_test.go b/backend/testbackend/onnx/onnx_test_split_variable_parts_default_axis_test.go new file mode 100644 index 00000000..09e77d26 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_split_variable_parts_default_axis_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSplitVariablePartsDefaultAxis(t *testing.T) { + mytest := NewTestSplitVariablePartsDefaultAxis() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sqrt_example_test.go b/backend/testbackend/onnx/onnx_test_sqrt_example_test.go new file mode 100644 index 00000000..c4fe4572 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sqrt_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSqrtExample(t *testing.T) { + mytest := NewTestSqrtExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sqrt_test.go b/backend/testbackend/onnx/onnx_test_sqrt_test.go new file mode 100644 index 00000000..a87ff4d8 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sqrt_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSqrt(t *testing.T) { + mytest := NewTestSqrt() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_squeeze.go b/backend/testbackend/onnx/onnx_test_squeeze.go index 881a17c1..36b8035e 100644 --- a/backend/testbackend/onnx/onnx_test_squeeze.go +++ b/backend/testbackend/onnx/onnx_test_squeeze.go @@ -26,7 +26,7 @@ func NewTestSqueeze() *testbackend.TestCase { Name: "", OpType: "Squeeze", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013df00)(name:"axes" type:INTS ints:0 ) + (*pb.AttributeProto)(0xc000119d00)(name:"axes" type:INTS ints:0 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_squeeze_test.go b/backend/testbackend/onnx/onnx_test_squeeze_test.go new file mode 100644 index 00000000..5e25dff0 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_squeeze_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSqueeze(t *testing.T) { + mytest := NewTestSqueeze() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sub_bcast_test.go b/backend/testbackend/onnx/onnx_test_sub_bcast_test.go new file mode 100644 index 00000000..31394a65 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sub_bcast_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSubBcast(t *testing.T) { + mytest := NewTestSubBcast() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sub_example_test.go b/backend/testbackend/onnx/onnx_test_sub_example_test.go new file mode 100644 index 00000000..9fe2190a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sub_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSubExample(t *testing.T) { + mytest := NewTestSubExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sub_test.go b/backend/testbackend/onnx/onnx_test_sub_test.go new file mode 100644 index 00000000..217559ae --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sub_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSub(t *testing.T) { + mytest := NewTestSub() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sum_example_test.go b/backend/testbackend/onnx/onnx_test_sum_example_test.go new file mode 100644 index 00000000..69955cbc --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sum_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSumExample(t *testing.T) { + mytest := NewTestSumExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sum_one_input_test.go b/backend/testbackend/onnx/onnx_test_sum_one_input_test.go new file mode 100644 index 00000000..a1a94110 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sum_one_input_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSumOneInput(t *testing.T) { + mytest := NewTestSumOneInput() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_sum_two_inputs_test.go b/backend/testbackend/onnx/onnx_test_sum_two_inputs_test.go new file mode 100644 index 00000000..a7ba76da --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_sum_two_inputs_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestSumTwoInputs(t *testing.T) { + mytest := NewTestSumTwoInputs() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tan_example_test.go b/backend/testbackend/onnx/onnx_test_tan_example_test.go new file mode 100644 index 00000000..f5108627 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tan_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTanExample(t *testing.T) { + mytest := NewTestTanExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tan_test.go b/backend/testbackend/onnx/onnx_test_tan_test.go new file mode 100644 index 00000000..48f612f0 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tan_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTan(t *testing.T) { + mytest := NewTestTan() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tanh_example_test.go b/backend/testbackend/onnx/onnx_test_tanh_example_test.go new file mode 100644 index 00000000..c10a41c6 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tanh_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTanhExample(t *testing.T) { + mytest := NewTestTanhExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tanh_test.go b/backend/testbackend/onnx/onnx_test_tanh_test.go new file mode 100644 index 00000000..0c73ea9d --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tanh_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTanh(t *testing.T) { + mytest := NewTestTanh() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip0.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip0.go index 3b9fcd32..3ec33115 100644 --- a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip0.go +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip0.go @@ -26,13 +26,13 @@ func NewTestTfidfvectorizerTfBatchOnlybigramsSkip0() *testbackend.TestCase { Name: "", OpType: "TfIdfVectorizer", Attributes: ([]*pb.AttributeProto) (len=7 cap=8) { - (*pb.AttributeProto)(0xc00011c800)(name:"max_gram_length" type:INT i:2 ), - (*pb.AttributeProto)(0xc00011c900)(name:"max_skip_count" type:INT ), - (*pb.AttributeProto)(0xc00011ca00)(name:"min_gram_length" type:INT i:2 ), - (*pb.AttributeProto)(0xc00011cb00)(name:"mode" type:STRING s:"TF" ), - (*pb.AttributeProto)(0xc00011cc00)(name:"ngram_counts" type:INTS ints:0 ints:4 ), - (*pb.AttributeProto)(0xc00011cd00)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ints:3 ints:4 ints:5 ints:6 ), - (*pb.AttributeProto)(0xc00011ce00)(name:"pool_int64s" type:INTS ints:2 ints:3 ints:5 ints:4 ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) + (*pb.AttributeProto)(0xc000133a00)(name:"max_gram_length" type:INT i:2 ), + (*pb.AttributeProto)(0xc000133b00)(name:"max_skip_count" type:INT ), + (*pb.AttributeProto)(0xc000133c00)(name:"min_gram_length" type:INT i:2 ), + (*pb.AttributeProto)(0xc000133d00)(name:"mode" type:STRING s:"TF" ), + (*pb.AttributeProto)(0xc000133e00)(name:"ngram_counts" type:INTS ints:0 ints:4 ), + (*pb.AttributeProto)(0xc000133f00)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ints:3 ints:4 ints:5 ints:6 ), + (*pb.AttributeProto)(0xc0001fc000)(name:"pool_int64s" type:INTS ints:2 ints:3 ints:5 ints:4 ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip0_test.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip0_test.go new file mode 100644 index 00000000..331cb208 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip0_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTfidfvectorizerTfBatchOnlybigramsSkip0(t *testing.T) { + mytest := NewTestTfidfvectorizerTfBatchOnlybigramsSkip0() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip5.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip5.go index 317447b0..31e0638a 100644 --- a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip5.go +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip5.go @@ -26,13 +26,13 @@ func NewTestTfidfvectorizerTfBatchOnlybigramsSkip5() *testbackend.TestCase { Name: "", OpType: "TfIdfVectorizer", Attributes: ([]*pb.AttributeProto) (len=7 cap=8) { - (*pb.AttributeProto)(0xc00011d300)(name:"max_gram_length" type:INT i:2 ), - (*pb.AttributeProto)(0xc00011d400)(name:"max_skip_count" type:INT i:5 ), - (*pb.AttributeProto)(0xc00011d500)(name:"min_gram_length" type:INT i:2 ), - (*pb.AttributeProto)(0xc00011d600)(name:"mode" type:STRING s:"TF" ), - (*pb.AttributeProto)(0xc00011d700)(name:"ngram_counts" type:INTS ints:0 ints:4 ), - (*pb.AttributeProto)(0xc00011d800)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ints:3 ints:4 ints:5 ints:6 ), - (*pb.AttributeProto)(0xc00011d900)(name:"pool_int64s" type:INTS ints:2 ints:3 ints:5 ints:4 ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) + (*pb.AttributeProto)(0xc0001fc100)(name:"max_gram_length" type:INT i:2 ), + (*pb.AttributeProto)(0xc0001fc200)(name:"max_skip_count" type:INT i:5 ), + (*pb.AttributeProto)(0xc0001fc300)(name:"min_gram_length" type:INT i:2 ), + (*pb.AttributeProto)(0xc0001fc400)(name:"mode" type:STRING s:"TF" ), + (*pb.AttributeProto)(0xc0001fc500)(name:"ngram_counts" type:INTS ints:0 ints:4 ), + (*pb.AttributeProto)(0xc0001fc600)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ints:3 ints:4 ints:5 ints:6 ), + (*pb.AttributeProto)(0xc0001fc700)(name:"pool_int64s" type:INTS ints:2 ints:3 ints:5 ints:4 ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip5_test.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip5_test.go new file mode 100644 index 00000000..6dfc3b62 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_onlybigrams_skip5_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTfidfvectorizerTfBatchOnlybigramsSkip5(t *testing.T) { + mytest := NewTestTfidfvectorizerTfBatchOnlybigramsSkip5() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_uniandbigrams_skip5.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_uniandbigrams_skip5.go index f35c4c96..431af604 100644 --- a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_uniandbigrams_skip5.go +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_uniandbigrams_skip5.go @@ -26,13 +26,13 @@ func NewTestTfidfvectorizerTfBatchUniandbigramsSkip5() *testbackend.TestCase { Name: "", OpType: "TfIdfVectorizer", Attributes: ([]*pb.AttributeProto) (len=7 cap=8) { - (*pb.AttributeProto)(0xc00011da00)(name:"max_gram_length" type:INT i:2 ), - (*pb.AttributeProto)(0xc00011db00)(name:"max_skip_count" type:INT i:5 ), - (*pb.AttributeProto)(0xc00011dc00)(name:"min_gram_length" type:INT i:1 ), - (*pb.AttributeProto)(0xc00011dd00)(name:"mode" type:STRING s:"TF" ), - (*pb.AttributeProto)(0xc00011de00)(name:"ngram_counts" type:INTS ints:0 ints:4 ), - (*pb.AttributeProto)(0xc00011df00)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ints:3 ints:4 ints:5 ints:6 ), - (*pb.AttributeProto)(0xc0002c8000)(name:"pool_int64s" type:INTS ints:2 ints:3 ints:5 ints:4 ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) + (*pb.AttributeProto)(0xc0002cc100)(name:"max_gram_length" type:INT i:2 ), + (*pb.AttributeProto)(0xc0002cc200)(name:"max_skip_count" type:INT i:5 ), + (*pb.AttributeProto)(0xc0002cc300)(name:"min_gram_length" type:INT i:1 ), + (*pb.AttributeProto)(0xc0002cc400)(name:"mode" type:STRING s:"TF" ), + (*pb.AttributeProto)(0xc0002cc500)(name:"ngram_counts" type:INTS ints:0 ints:4 ), + (*pb.AttributeProto)(0xc0002cc600)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ints:3 ints:4 ints:5 ints:6 ), + (*pb.AttributeProto)(0xc0002cc700)(name:"pool_int64s" type:INTS ints:2 ints:3 ints:5 ints:4 ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_uniandbigrams_skip5_test.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_uniandbigrams_skip5_test.go new file mode 100644 index 00000000..ea4b9954 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_batch_uniandbigrams_skip5_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTfidfvectorizerTfBatchUniandbigramsSkip5(t *testing.T) { + mytest := NewTestTfidfvectorizerTfBatchUniandbigramsSkip5() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_only_bigrams_skip0.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_only_bigrams_skip0.go index 1a18b2c6..7a001128 100644 --- a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_only_bigrams_skip0.go +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_only_bigrams_skip0.go @@ -26,13 +26,13 @@ func NewTestTfidfvectorizerTfOnlyBigramsSkip0() *testbackend.TestCase { Name: "", OpType: "TfIdfVectorizer", Attributes: ([]*pb.AttributeProto) (len=7 cap=8) { - (*pb.AttributeProto)(0xc00013cd00)(name:"max_gram_length" type:INT i:2 ), - (*pb.AttributeProto)(0xc00013ce00)(name:"max_skip_count" type:INT ), - (*pb.AttributeProto)(0xc00013cf00)(name:"min_gram_length" type:INT i:2 ), - (*pb.AttributeProto)(0xc00013d000)(name:"mode" type:STRING s:"TF" ), - (*pb.AttributeProto)(0xc00013d100)(name:"ngram_counts" type:INTS ints:0 ints:4 ), - (*pb.AttributeProto)(0xc00013d200)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ints:3 ints:4 ints:5 ints:6 ), - (*pb.AttributeProto)(0xc00013d300)(name:"pool_int64s" type:INTS ints:2 ints:3 ints:5 ints:4 ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) + (*pb.AttributeProto)(0xc0002ccd00)(name:"max_gram_length" type:INT i:2 ), + (*pb.AttributeProto)(0xc0002cce00)(name:"max_skip_count" type:INT ), + (*pb.AttributeProto)(0xc0002ccf00)(name:"min_gram_length" type:INT i:2 ), + (*pb.AttributeProto)(0xc0002cd000)(name:"mode" type:STRING s:"TF" ), + (*pb.AttributeProto)(0xc0002cd100)(name:"ngram_counts" type:INTS ints:0 ints:4 ), + (*pb.AttributeProto)(0xc0002cd200)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ints:3 ints:4 ints:5 ints:6 ), + (*pb.AttributeProto)(0xc0002cd300)(name:"pool_int64s" type:INTS ints:2 ints:3 ints:5 ints:4 ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_only_bigrams_skip0_test.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_only_bigrams_skip0_test.go new file mode 100644 index 00000000..fe76e427 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_only_bigrams_skip0_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTfidfvectorizerTfOnlyBigramsSkip0(t *testing.T) { + mytest := NewTestTfidfvectorizerTfOnlyBigramsSkip0() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_levelempty.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_levelempty.go index 146860ed..b3f77fe2 100644 --- a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_levelempty.go +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_levelempty.go @@ -26,13 +26,13 @@ func NewTestTfidfvectorizerTfOnlybigramsLevelempty() *testbackend.TestCase { Name: "", OpType: "TfIdfVectorizer", Attributes: ([]*pb.AttributeProto) (len=7 cap=8) { - (*pb.AttributeProto)(0xc00013d400)(name:"max_gram_length" type:INT i:2 ), - (*pb.AttributeProto)(0xc00013d500)(name:"max_skip_count" type:INT ), - (*pb.AttributeProto)(0xc00013d600)(name:"min_gram_length" type:INT i:2 ), - (*pb.AttributeProto)(0xc00013d700)(name:"mode" type:STRING s:"TF" ), - (*pb.AttributeProto)(0xc00013d800)(name:"ngram_counts" type:INTS ints:0 ints:0 ), - (*pb.AttributeProto)(0xc00013d900)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ), - (*pb.AttributeProto)(0xc00013da00)(name:"pool_int64s" type:INTS ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) + (*pb.AttributeProto)(0xc0002cd400)(name:"max_gram_length" type:INT i:2 ), + (*pb.AttributeProto)(0xc0002cd500)(name:"max_skip_count" type:INT ), + (*pb.AttributeProto)(0xc0002cd600)(name:"min_gram_length" type:INT i:2 ), + (*pb.AttributeProto)(0xc0002cd700)(name:"mode" type:STRING s:"TF" ), + (*pb.AttributeProto)(0xc0002cd800)(name:"ngram_counts" type:INTS ints:0 ints:0 ), + (*pb.AttributeProto)(0xc0002cd900)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ), + (*pb.AttributeProto)(0xc0002cda00)(name:"pool_int64s" type:INTS ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_levelempty_test.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_levelempty_test.go new file mode 100644 index 00000000..28310c5b --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_levelempty_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTfidfvectorizerTfOnlybigramsLevelempty(t *testing.T) { + mytest := NewTestTfidfvectorizerTfOnlybigramsLevelempty() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_skip5.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_skip5.go index 7dc905b9..601a7e13 100644 --- a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_skip5.go +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_skip5.go @@ -26,13 +26,13 @@ func NewTestTfidfvectorizerTfOnlybigramsSkip5() *testbackend.TestCase { Name: "", OpType: "TfIdfVectorizer", Attributes: ([]*pb.AttributeProto) (len=7 cap=8) { - (*pb.AttributeProto)(0xc00013db00)(name:"max_gram_length" type:INT i:2 ), - (*pb.AttributeProto)(0xc00013dc00)(name:"max_skip_count" type:INT i:5 ), - (*pb.AttributeProto)(0xc00013dd00)(name:"min_gram_length" type:INT i:2 ), - (*pb.AttributeProto)(0xc00013de00)(name:"mode" type:STRING s:"TF" ), - (*pb.AttributeProto)(0xc00013df00)(name:"ngram_counts" type:INTS ints:0 ints:4 ), - (*pb.AttributeProto)(0xc000162000)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ints:3 ints:4 ints:5 ints:6 ), - (*pb.AttributeProto)(0xc000162100)(name:"pool_int64s" type:INTS ints:2 ints:3 ints:5 ints:4 ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) + (*pb.AttributeProto)(0xc000126500)(name:"max_gram_length" type:INT i:2 ), + (*pb.AttributeProto)(0xc000126600)(name:"max_skip_count" type:INT i:5 ), + (*pb.AttributeProto)(0xc000126700)(name:"min_gram_length" type:INT i:2 ), + (*pb.AttributeProto)(0xc000126800)(name:"mode" type:STRING s:"TF" ), + (*pb.AttributeProto)(0xc000126900)(name:"ngram_counts" type:INTS ints:0 ints:4 ), + (*pb.AttributeProto)(0xc000126a00)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ints:3 ints:4 ints:5 ints:6 ), + (*pb.AttributeProto)(0xc000126b00)(name:"pool_int64s" type:INTS ints:2 ints:3 ints:5 ints:4 ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_skip5_test.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_skip5_test.go new file mode 100644 index 00000000..1e484640 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_onlybigrams_skip5_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTfidfvectorizerTfOnlybigramsSkip5(t *testing.T) { + mytest := NewTestTfidfvectorizerTfOnlybigramsSkip5() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_uniandbigrams_skip5.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_uniandbigrams_skip5.go index 2edeb94f..cda077e5 100644 --- a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_uniandbigrams_skip5.go +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_uniandbigrams_skip5.go @@ -26,13 +26,13 @@ func NewTestTfidfvectorizerTfUniandbigramsSkip5() *testbackend.TestCase { Name: "", OpType: "TfIdfVectorizer", Attributes: ([]*pb.AttributeProto) (len=7 cap=8) { - (*pb.AttributeProto)(0xc0002c8700)(name:"max_gram_length" type:INT i:2 ), - (*pb.AttributeProto)(0xc0002c8800)(name:"max_skip_count" type:INT i:5 ), - (*pb.AttributeProto)(0xc0002c8900)(name:"min_gram_length" type:INT i:1 ), - (*pb.AttributeProto)(0xc0002c8a00)(name:"mode" type:STRING s:"TF" ), - (*pb.AttributeProto)(0xc0002c8b00)(name:"ngram_counts" type:INTS ints:0 ints:4 ), - (*pb.AttributeProto)(0xc0002c8c00)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ints:3 ints:4 ints:5 ints:6 ), - (*pb.AttributeProto)(0xc0002c8d00)(name:"pool_int64s" type:INTS ints:2 ints:3 ints:5 ints:4 ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) + (*pb.AttributeProto)(0xc000118800)(name:"max_gram_length" type:INT i:2 ), + (*pb.AttributeProto)(0xc000118900)(name:"max_skip_count" type:INT i:5 ), + (*pb.AttributeProto)(0xc000118a00)(name:"min_gram_length" type:INT i:1 ), + (*pb.AttributeProto)(0xc000118b00)(name:"mode" type:STRING s:"TF" ), + (*pb.AttributeProto)(0xc000118c00)(name:"ngram_counts" type:INTS ints:0 ints:4 ), + (*pb.AttributeProto)(0xc000118d00)(name:"ngram_indexes" type:INTS ints:0 ints:1 ints:2 ints:3 ints:4 ints:5 ints:6 ), + (*pb.AttributeProto)(0xc000118e00)(name:"pool_int64s" type:INTS ints:2 ints:3 ints:5 ints:4 ints:5 ints:6 ints:7 ints:8 ints:6 ints:7 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_uniandbigrams_skip5_test.go b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_uniandbigrams_skip5_test.go new file mode 100644 index 00000000..ebb01338 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tfidfvectorizer_tf_uniandbigrams_skip5_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTfidfvectorizerTfUniandbigramsSkip5(t *testing.T) { + mytest := NewTestTfidfvectorizerTfUniandbigramsSkip5() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_thresholdedrelu.go b/backend/testbackend/onnx/onnx_test_thresholdedrelu.go index c75f986a..36cb4d9d 100644 --- a/backend/testbackend/onnx/onnx_test_thresholdedrelu.go +++ b/backend/testbackend/onnx/onnx_test_thresholdedrelu.go @@ -26,7 +26,7 @@ func NewTestThresholdedrelu() *testbackend.TestCase { Name: "", OpType: "ThresholdedRelu", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc000162500)(name:"alpha" type:FLOAT f:2 ) + (*pb.AttributeProto)(0xc000127000)(name:"alpha" type:FLOAT f:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_thresholdedrelu_default_test.go b/backend/testbackend/onnx/onnx_test_thresholdedrelu_default_test.go new file mode 100644 index 00000000..29b9ff50 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_thresholdedrelu_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestThresholdedreluDefault(t *testing.T) { + mytest := NewTestThresholdedreluDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_thresholdedrelu_example.go b/backend/testbackend/onnx/onnx_test_thresholdedrelu_example.go index aedbee12..c44c98c1 100644 --- a/backend/testbackend/onnx/onnx_test_thresholdedrelu_example.go +++ b/backend/testbackend/onnx/onnx_test_thresholdedrelu_example.go @@ -26,7 +26,7 @@ func NewTestThresholdedreluExample() *testbackend.TestCase { Name: "", OpType: "ThresholdedRelu", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc000162e00)(name:"alpha" type:FLOAT f:2 ) + (*pb.AttributeProto)(0xc000119400)(name:"alpha" type:FLOAT f:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_thresholdedrelu_example_test.go b/backend/testbackend/onnx/onnx_test_thresholdedrelu_example_test.go new file mode 100644 index 00000000..c2e8f44a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_thresholdedrelu_example_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestThresholdedreluExample(t *testing.T) { + mytest := NewTestThresholdedreluExample() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_thresholdedrelu_test.go b/backend/testbackend/onnx/onnx_test_thresholdedrelu_test.go new file mode 100644 index 00000000..245a3202 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_thresholdedrelu_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestThresholdedrelu(t *testing.T) { + mytest := NewTestThresholdedrelu() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tile_precomputed_test.go b/backend/testbackend/onnx/onnx_test_tile_precomputed_test.go new file mode 100644 index 00000000..5eb41c35 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tile_precomputed_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTilePrecomputed(t *testing.T) { + mytest := NewTestTilePrecomputed() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_tile_test.go b/backend/testbackend/onnx/onnx_test_tile_test.go new file mode 100644 index 00000000..f4561a0a --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_tile_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTile(t *testing.T) { + mytest := NewTestTile() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_top_k.go b/backend/testbackend/onnx/onnx_test_top_k.go new file mode 100644 index 00000000..c695f316 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_top_k.go @@ -0,0 +1,60 @@ +package onnxtest + +// this file is auto-generated... DO NOT EDIT + +import ( + "github.com/owulveryck/onnx-go/backend/testbackend" + "gorgonia.org/tensor" +) + +func init() { + testbackend.Register("TopK", "TestTopK", NewTestTopK) +} + +// NewTestTopK version: 4. +func NewTestTopK() *testbackend.TestCase { + return &testbackend.TestCase{ + OpType: "TopK", + Title: "TestTopK", + ModelB: []byte{0x8, 0x4, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x86, 0x1, 0xa, 0x1d, 0xa, 0x1, 0x78, 0xa, 0x1, 0x6b, 0x12, 0x6, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x7, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0x4, 0x54, 0x6f, 0x70, 0x4b, 0x12, 0xa, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x70, 0x5f, 0x6b, 0x5a, 0x13, 0xa, 0x1, 0x78, 0x12, 0xe, 0xa, 0xc, 0x8, 0x1, 0x12, 0x8, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x4, 0x5a, 0xf, 0xa, 0x1, 0x6b, 0x12, 0xa, 0xa, 0x8, 0x8, 0x7, 0x12, 0x4, 0xa, 0x2, 0x8, 0x1, 0x62, 0x18, 0xa, 0x6, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x1, 0x12, 0x8, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x3, 0x62, 0x19, 0xa, 0x7, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x12, 0xe, 0xa, 0xc, 0x8, 0x7, 0x12, 0x8, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x3, 0x42, 0x2, 0x10, 0xa}, + + /* + + &pb.NodeProto{ + Input: []string{"x", "k"}, + Output: []string{"values", "indices"}, + Name: "", + OpType: "TopK", + Attributes: ([]*pb.AttributeProto) + , + }, + + + */ + + Input: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3, 4), + tensor.WithBacking([]float32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), + ), + + tensor.New( + tensor.WithShape(1), + tensor.WithBacking([]float32{3}), + ), + }, + ExpectedOutput: []tensor.Tensor{ + + tensor.New( + tensor.WithShape(3, 3), + tensor.WithBacking([]float32{3, 2, 1, 7, 6, 5, 11, 10, 9}), + ), + + tensor.New( + tensor.WithShape(3, 3), + tensor.WithBacking([]int64{3, 2, 1, 3, 2, 1, 3, 2, 1}), + ), + }, + } +} diff --git a/backend/testbackend/onnx/onnx_test_top_k_test.go b/backend/testbackend/onnx/onnx_test_top_k_test.go new file mode 100644 index 00000000..0a3dbfc1 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_top_k_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTopK(t *testing.T) { + mytest := NewTestTopK() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_0.go b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_0.go index 52e3c14e..dff713e4 100644 --- a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_0.go +++ b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_0.go @@ -26,7 +26,7 @@ func NewTestTransposeAllPermutations0() *testbackend.TestCase { Name: "", OpType: "Transpose", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011ca00)(name:"perm" type:INTS ints:0 ints:1 ints:2 ) + (*pb.AttributeProto)(0xc000126600)(name:"perm" type:INTS ints:0 ints:1 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_0_test.go b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_0_test.go new file mode 100644 index 00000000..1ccf8f21 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_0_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTransposeAllPermutations0(t *testing.T) { + mytest := NewTestTransposeAllPermutations0() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_1.go b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_1.go index 67a7bb7a..2f285487 100644 --- a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_1.go +++ b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_1.go @@ -26,7 +26,7 @@ func NewTestTransposeAllPermutations1() *testbackend.TestCase { Name: "", OpType: "Transpose", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013cb00)(name:"perm" type:INTS ints:0 ints:2 ints:1 ) + (*pb.AttributeProto)(0xc000126000)(name:"perm" type:INTS ints:0 ints:2 ints:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_1_test.go b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_1_test.go new file mode 100644 index 00000000..99558e42 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_1_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTransposeAllPermutations1(t *testing.T) { + mytest := NewTestTransposeAllPermutations1() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_2.go b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_2.go index 3fbe790f..3415624a 100644 --- a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_2.go +++ b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_2.go @@ -26,7 +26,7 @@ func NewTestTransposeAllPermutations2() *testbackend.TestCase { Name: "", OpType: "Transpose", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013c200)(name:"perm" type:INTS ints:1 ints:0 ints:2 ) + (*pb.AttributeProto)(0xc000126100)(name:"perm" type:INTS ints:1 ints:0 ints:2 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_2_test.go b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_2_test.go new file mode 100644 index 00000000..321a570e --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_2_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTransposeAllPermutations2(t *testing.T) { + mytest := NewTestTransposeAllPermutations2() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_3.go b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_3.go index 3ded8184..d1811f68 100644 --- a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_3.go +++ b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_3.go @@ -26,7 +26,7 @@ func NewTestTransposeAllPermutations3() *testbackend.TestCase { Name: "", OpType: "Transpose", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013c800)(name:"perm" type:INTS ints:1 ints:2 ints:0 ) + (*pb.AttributeProto)(0xc000126800)(name:"perm" type:INTS ints:1 ints:2 ints:0 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_3_test.go b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_3_test.go new file mode 100644 index 00000000..4a8ec971 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_3_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTransposeAllPermutations3(t *testing.T) { + mytest := NewTestTransposeAllPermutations3() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_4.go b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_4.go index fa9a0891..097b371f 100644 --- a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_4.go +++ b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_4.go @@ -26,7 +26,7 @@ func NewTestTransposeAllPermutations4() *testbackend.TestCase { Name: "", OpType: "Transpose", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00011c100)(name:"perm" type:INTS ints:2 ints:0 ints:1 ) + (*pb.AttributeProto)(0xc000132e00)(name:"perm" type:INTS ints:2 ints:0 ints:1 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_4_test.go b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_4_test.go new file mode 100644 index 00000000..53e20142 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_4_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTransposeAllPermutations4(t *testing.T) { + mytest := NewTestTransposeAllPermutations4() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_5.go b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_5.go index 1c7e0bc8..592f2341 100644 --- a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_5.go +++ b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_5.go @@ -26,7 +26,7 @@ func NewTestTransposeAllPermutations5() *testbackend.TestCase { Name: "", OpType: "Transpose", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013d100)(name:"perm" type:INTS ints:2 ints:1 ints:0 ) + (*pb.AttributeProto)(0xc000132f00)(name:"perm" type:INTS ints:2 ints:1 ints:0 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_transpose_all_permutations_5_test.go b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_5_test.go new file mode 100644 index 00000000..95465c22 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_transpose_all_permutations_5_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTransposeAllPermutations5(t *testing.T) { + mytest := NewTestTransposeAllPermutations5() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_transpose_default_test.go b/backend/testbackend/onnx/onnx_test_transpose_default_test.go new file mode 100644 index 00000000..a4d56ac1 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_transpose_default_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestTransposeDefault(t *testing.T) { + mytest := NewTestTransposeDefault() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_unsqueeze.go b/backend/testbackend/onnx/onnx_test_unsqueeze.go index 8f6f9dac..ddd943af 100644 --- a/backend/testbackend/onnx/onnx_test_unsqueeze.go +++ b/backend/testbackend/onnx/onnx_test_unsqueeze.go @@ -26,7 +26,7 @@ func NewTestUnsqueeze() *testbackend.TestCase { Name: "", OpType: "Unsqueeze", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013d600)(name:"axes" type:INTS ints:0 ) + (*pb.AttributeProto)(0xc000127800)(name:"axes" type:INTS ints:0 ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_unsqueeze_test.go b/backend/testbackend/onnx/onnx_test_unsqueeze_test.go new file mode 100644 index 00000000..53ae69d0 --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_unsqueeze_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestUnsqueeze(t *testing.T) { + mytest := NewTestUnsqueeze() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} diff --git a/backend/testbackend/onnx/onnx_test_upsample_nearest.go b/backend/testbackend/onnx/onnx_test_upsample_nearest.go index e2819537..97b38b27 100644 --- a/backend/testbackend/onnx/onnx_test_upsample_nearest.go +++ b/backend/testbackend/onnx/onnx_test_upsample_nearest.go @@ -26,7 +26,7 @@ func NewTestUpsampleNearest() *testbackend.TestCase { Name: "", OpType: "Upsample", Attributes: ([]*pb.AttributeProto) (len=1 cap=1) { - (*pb.AttributeProto)(0xc00013d700)(name:"mode" type:STRING s:"nearest" ) + (*pb.AttributeProto)(0xc000133000)(name:"mode" type:STRING s:"nearest" ) } , }, diff --git a/backend/testbackend/onnx/onnx_test_upsample_nearest_test.go b/backend/testbackend/onnx/onnx_test_upsample_nearest_test.go new file mode 100644 index 00000000..1d29f58f --- /dev/null +++ b/backend/testbackend/onnx/onnx_test_upsample_nearest_test.go @@ -0,0 +1,26 @@ +package onnxtest + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + "github.com/owulveryck/onnx-go/internal/pb-onnx" +) + +func TestNewTestUpsampleNearest(t *testing.T) { + mytest := NewTestUpsampleNearest() + var model pb.ModelProto + err := proto.Unmarshal(mytest.ModelB, &model) + if err != nil { + t.Fatal(err) + } + if model.Graph == nil { + t.Fatal("graph is nil") + } + if len(model.Graph.Input) != len(mytest.Input) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) + } + if len(model.Graph.Output) != len(mytest.ExpectedOutput) { + t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) + } +} From f98ed75fb40671917668c4c18492d40edfb88fd0 Mon Sep 17 00:00:00 2001 From: Olivier Wulveryck Date: Wed, 22 May 2019 11:56:45 +0200 Subject: [PATCH 4/7] wip: temporary comment this test --- backend/testbackend/onnx/onnx_test_reshape_one_dim.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/testbackend/onnx/onnx_test_reshape_one_dim.go b/backend/testbackend/onnx/onnx_test_reshape_one_dim.go index 5e7640c2..5796d5b4 100644 --- a/backend/testbackend/onnx/onnx_test_reshape_one_dim.go +++ b/backend/testbackend/onnx/onnx_test_reshape_one_dim.go @@ -8,7 +8,7 @@ import ( ) func init() { - testbackend.Register("Reshape", "TestReshapeOneDim", NewTestReshapeOneDim) + // testbackend.Register("Reshape", "TestReshapeOneDim", NewTestReshapeOneDim) } // NewTestReshapeOneDim version: 3. @@ -41,7 +41,7 @@ func NewTestReshapeOneDim() *testbackend.TestCase { tensor.New( tensor.WithShape(1), - tensor.WithBacking([]float32{24}), + tensor.WithBacking([]int{24}), ), }, ExpectedOutput: []tensor.Tensor{ From 9d60010b315d5e75c3fd2b4ef2ea3f3a9eb1f0d2 Mon Sep 17 00:00:00 2001 From: Olivier Wulveryck Date: Wed, 22 May 2019 11:57:14 +0200 Subject: [PATCH 5/7] chore: coverage --- backend/x/gorgonnx/ONNX_COVERAGE.md | 590 +++++++++++++++------------- 1 file changed, 308 insertions(+), 282 deletions(-) diff --git a/backend/x/gorgonnx/ONNX_COVERAGE.md b/backend/x/gorgonnx/ONNX_COVERAGE.md index 1614b223..07f0e94d 100644 --- a/backend/x/gorgonnx/ONNX_COVERAGE.md +++ b/backend/x/gorgonnx/ONNX_COVERAGE.md @@ -1,327 +1,353 @@ -Covering 21.1% of the onnx integration tests +Covering 19.5% of the onnx integration tests |.| OpType | Test | Tested | Skipped | Failed | |-|-------------|----------------------|--------|---------|--------| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sin|TestSin|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sqrt|TestSqrtExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sub|TestSub|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Exp|TestExp|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Ceil|TestCeil|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat3dAxis1|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestConvWithStridesPadding|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxDefaultAxis|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Relu|TestRelu|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sigmoid|TestSigmoid|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Cos|TestCosExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Add|TestAddBcast|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Abs|TestAbs|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sub|TestSubExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat3dAxis2|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeReorderedDims|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Tanh|TestTanhExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softplus|TestSoftplusExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Log|TestLogExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Gemm|TestGemmNobroadcast|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat2dAxis0|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dCeil|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dPads|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeExtendedDims|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softplus|TestSoftplus|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sign|TestSign|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MatMul|TestMatmul2d|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Neg|TestNegExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat3dAxis0|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxAxis2|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Dropout|TestDropoutRandom|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Identity|TestIdentity|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Div|TestDiv|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Add|TestAdd|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Floor|TestFloorExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Mul|TestMul|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestBasicConvWithPadding|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat2dAxis1|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Exp|TestExp|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sin|TestSinExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sigmoid|TestSigmoidExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeNegativeDim|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat3dAxis1|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Div|TestDivExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Exp|TestExpExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeReducedDims|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dPrecomputedStrides|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxDefaultAxis|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sin|TestSin|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxLargeNumber|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Div|TestDivBcast|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dCeil|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat1dAxis0|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Mul|TestMulExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeNegativeDim|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sub|TestSub|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Div|TestDiv|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat2dAxis0|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sqrt|TestSqrtExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxAxis1|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Mul|TestMulBcast|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dDefault|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxAxis0|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Tanh|TestTanhExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Dropout|TestDropoutDefault|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Log|TestLogExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dStrides|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Exp|TestExpExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Mul|TestMul|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Div|TestDivExample|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Floor|TestFloor|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Dropout|TestDropoutRandom|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Neg|TestNegExample|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Tanh|TestTanh|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeReducedDims|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestBasicConvWithoutPadding|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxAxis2|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Reshape|TestReshapeReorderedDims|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sub|TestSubExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sigmoid|TestSigmoid|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestConvWithStridesNoPadding|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Gemm|TestGemmBroadcast|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxAxis0|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat1dAxis0|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softplus|TestSoftplusExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestBasicConvWithPadding|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat3dAxis0|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sqrt|TestSqrt|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MatMul|TestMatmul2d|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Cos|TestCos|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Dropout|TestDropoutDefault|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestConvWithStridesNoPadding|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestBasicConvWithoutPadding|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Ceil|TestCeilExample|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sub|TestSubBcast|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Conv|TestConvWithStridesPadding|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dStrides|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Mul|TestMulExample|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Gemm|TestGemmBroadcast|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sin|TestSinExample|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Neg|TestNeg|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Gemm|TestGemmNobroadcast|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Add|TestAddBcast|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Concat|TestConcat3dAxis2|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Abs|TestAbs|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Ceil|TestCeilExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sigmoid|TestSigmoidExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Identity|TestIdentity|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Log|TestLog|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softmax|TestSoftmaxAxis1|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dPads|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Cos|TestCosExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Mul|TestMulBcast|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Cos|TestCos|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Add|TestAdd|true|false|false| |![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|MaxPool|TestMaxpool2dPrecomputedPads|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Floor|TestFloorExample|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Relu|TestRelu|true|false|false| -|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sign|TestSign|true|false|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Gather|TestGather0|true|true|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Sqrt|TestSqrt|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Log|TestLog|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Softplus|TestSoftplus|true|false|false| +|![#c5f015](https://placehold.it/15/c5f015/000000?text=+)|Div|TestDivBcast|true|false|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dCeil|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pad|TestEdgePad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|NonMaxSuppression|TestNonmaxsuppressionSuppressByIOU|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPow|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MatMul|TestMatmul3d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pad|TestConstantPad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|NonMaxSuppression|TestNonmaxsuppressionSingleBox|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Unsqueeze|TestUnsqueeze|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipOutbounds|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfUniandbigramsSkip5|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClip|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Expand|TestExpandDimChanged|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxDefaultAxisExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Size|TestSize|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminKeepdimsExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeDownsampleNearest|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalAveragePool|TestGlobalaveragepool|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxAxis1|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalMaxPool|TestGlobalmaxpool|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeNearest|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool1dDefault|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminNoKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LRN|TestLrnDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxExample1|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acos|TestAcos|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxAxis2|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sum|TestSumOneInput|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cosh|TestCosh|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations3|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shrink|TestShrinkSoft|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Upsample|TestUpsampleNearest|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxAxis0|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxLargeNumber|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis3|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mean|TestMeanTwoInputs|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfBatchOnlybigramsSkip5|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxNoKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ThresholdedRelu|TestThresholdedreluDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|HardSigmoid|TestHardsigmoidDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitVariablePartsDefaultAxis|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitEqualParts1d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dSameLower|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPowBcastArray|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations5|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposePads|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpoolWithArgmax2dPrecomputedPads|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminDefaultAxisExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Expand|TestExpandDimChanged|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shrink|TestShrinkHard|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceNegSteps|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Selu|TestSeluExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atanh|TestAtanhExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenDefaultAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|NonMaxSuppression|TestNonmaxsuppressionTwoClasses|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDoNotKeepdimsExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|EyeLike|TestEyelikeWithoutDtype|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Max|TestMaxOneInput|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mean|TestMeanOneInput|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1KeepDimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atan|TestAtanExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dDilations|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxUnpool|TestMaxunpoolExportWithOutputShape|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxOneHot|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shape|TestShapeExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asin|TestAsinExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPads|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ThresholdedRelu|TestThresholdedreluExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pad|TestConstantPad|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|BatchNormalization|TestBatchnormEpsilon|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminDefaultAxisRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|NonMaxSuppression|TestNonmaxsuppressionIdenticalBoxes|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Reciprocal|TestReciprocal|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ThresholdedRelu|TestThresholdedrelu|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MatMul|TestMatmul3d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LeakyRelu|TestLeakyreluDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxAxis0|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Max|TestMaxExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tile|TestTile|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis3|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminDefaultAxisExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Scatter|TestScatterWithoutAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfBatchOnlybigramsSkip5|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitEqualParts2d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mean|TestMeanTwoInputs|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConstantOfShape|TestConstantofshapeIntZeros|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations3|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atan|TestAtan|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipDefaultInbounds|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acosh|TestAcosh|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acos|TestAcosExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MatMul|TestMatmul4d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipDefaultMax|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Gather|TestGather0|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Selu|TestSeluDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSumAscAxes|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeOutputShape|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitVariableParts1d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Min|TestMinExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tan|TestTanExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dPrecomputedSameUpper|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSum|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Min|TestMinTwoInputs|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dSameUpper|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shape|TestShape|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxDefaultAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sum|TestSumOneInput|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxNoKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxAxis0|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Softsign|TestSoftsign|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitEqualPartsDefaultAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminNoKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Expand|TestExpandDimUnchanged|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxAxis2|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations0|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dStrides|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipInbounds|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|EyeLike|TestEyelikeWithDtype|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TopK|TestTopK|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxAxis2|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asinh|TestAsinh|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceDefaultSteps|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSlice|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenDefaultAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atanh|TestAtanhExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipInbounds|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|DepthToSpace|TestDepthtospace|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|DepthToSpace|TestDepthtospaceExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposePads|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LRN|TestLrnDefault|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSumDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtranspose1d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dSameUpper|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|PRelu|TestPreluBroadcast|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atan|TestAtanExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfOnlyBigramsSkip0|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfOnlybigramsLevelempty|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dSameLower|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfOnlybigramsSkip5|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedPadsCountIncludePad|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LeakyRelu|TestLeakyrelu|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Scan|TestScan9Sum|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis2|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalAveragePool|TestGlobalaveragepool|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|RoiAlign|TestRoialign|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dPrecomputedSameUpper|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceDefaultAxes|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Selu|TestSeluExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedSameUpper|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipSplitbounds|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPowBcastArray|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedPads|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposePad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Gather|TestGather1|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxDefaultAxisRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalAveragePool|TestGlobalaveragepoolPrecomputed|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxUnpool|TestMaxunpoolExportWithoutOutputShape|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atanh|TestAtanh|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pad|TestReflectPad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acos|TestAcosExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPads|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|BatchNormalization|TestBatchnormExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpoolWithArgmax2dPrecomputedPads|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtranspose|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MeanVarianceNormalization|TestMvn|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|HardSigmoid|TestHardsigmoidDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Elu|TestEluDefault|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2KeepDimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxAxis1|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposePad|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPadsCountIncludePad|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|HardSigmoid|TestHardsigmoid|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeUpsampleLinear|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Scatter|TestScatterWithoutAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations5|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acosh|TestAcosh|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfOnlybigramsLevelempty|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sinh|TestSinhExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedPadsCountIncludePad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dSameLower|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|NonMaxSuppression|TestNonmaxsuppressionCenterPointBoxFormat|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LeakyRelu|TestLeakyreluExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shape|TestShapeExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeUpsampleNearest|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceEndOutOfBounds|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSumAscAxes|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis0|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfBatchOnlybigramsSkip0|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDefaultAxesKeepdimExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dSameUpper|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|InstanceNormalization|TestInstancenormExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSlice|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceDefaultAxes|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|DepthToSpace|TestDepthtospace|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalMaxPool|TestGlobalmaxpoolPrecomputed|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mod|TestModMixedSignInt64|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedStrides|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cast|TestCastFLOATToDOUBLE|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitEqualParts1d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxKeepdimsRandom|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sinh|TestSinh|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|EyeLike|TestEyelikeWithDtype|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeDownsampleLinear|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tile|TestTilePrecomputed|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Min|TestMinTwoInputs|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Max|TestMaxTwoInputs|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Unsqueeze|TestUnsqueeze|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|InstanceNormalization|TestInstancenormEpsilon|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|PRelu|TestPreluExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mod|TestModMixedSignFloat32|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfBatchUniandbigramsSkip5|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sum|TestSumTwoInputs|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxAxis1|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mean|TestMeanOneInput|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtranspose3d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis1|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeUpsampleLinear|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|NonMaxSuppression|TestNonmaxsuppressionSuppressByIOUAndScores|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDoNotKeepdimsExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asinh|TestAsinhExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceDefaultSteps|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedSameUpper|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations4|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClip|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Elu|TestEluDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPowExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|BatchNormalization|TestBatchnormExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxAxis1|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeWithKernel|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asin|TestAsin|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeKernelShape|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Softsign|TestSoftsign|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Scan|TestScan9Sum|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cast|TestCastDOUBLEToFLOAT|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dSameLower|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mod|TestModMixedSignInt32|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSumDescAxes|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Expand|TestExpandDimUnchanged|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tan|TestTan|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LRN|TestLrn|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dSameUpper|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Selu|TestSelu|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalAveragePool|TestGlobalaveragepoolPrecomputed|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxOneHot|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeOutputShape|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeDilations|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxLargeNumber|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxExample1|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumKeepdimsRandom|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mean|TestMeanExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Reciprocal|TestReciprocalExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|DepthToSpace|TestDepthtospaceExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtranspose3d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mod|TestModMixedSignFloat64|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceNegSteps|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1KeepDimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxNoKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shrink|TestShrinkSoft|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cast|TestCastFLOATToDOUBLE|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Shrink|TestShrinkHard|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReverseSequence|TestReversesequenceTime|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ThresholdedRelu|TestThresholdedreluExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cast|TestCastDOUBLEToFLOAT|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalMaxPool|TestGlobalmaxpoolPrecomputed|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDefaultAxesKeepdimExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitVariableParts1d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acosh|TestAcoshExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxDefaultAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeDownsampleNearest|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Max|TestMaxTwoInputs|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asin|TestAsinExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipDefaultInbounds|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tan|TestTanExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations2|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Min|TestMinOneInput|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|NonMaxSuppression|TestNonmaxsuppressionTwoBatches|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asin|TestAsin|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPowBcastScalar|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2KeepDimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis2|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool1dDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfUniandbigramsSkip5|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|HardSigmoid|TestHardsigmoidExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDoNotKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Atanh|TestAtanh|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipDefaultMax|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminNoKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool2dDilations|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipSplitbounds|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Squeeze|TestSqueeze|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acosh|TestAcoshExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool3dDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Max|TestMaxOneInput|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Reciprocal|TestReciprocalExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|HardSigmoid|TestHardsigmoid|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Softsign|TestSoftsignExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Slice|TestSliceNeg|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cosh|TestCoshExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool3dDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sum|TestSumExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Max|TestMaxExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Gather|TestGather1|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations0|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitEqualParts2d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sum|TestSumTwoInputs|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|EyeLike|TestEyelikePopulateOffMainDiagonal|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeDilations|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdDefaultAxesKeepdimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tile|TestTile|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPow|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dCeil|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LeakyRelu|TestLeakyreluDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxAxis0|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitVariableParts2d|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LogSoftmax|TestLogsoftmaxAxis2|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pad|TestReflectPad|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Min|TestMinOneInput|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxDefaultAxisExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMin|TestArgminDefaultAxisRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sinh|TestSinhExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDoNotKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis1|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Elu|TestElu|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConstantOfShape|TestConstantofshapeFloatOnes|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Conv|TestConvWithStridesAndAsymmetricPadding|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSum|TestReduceLogSum|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Scatter|TestScatterWithAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceProd|TestReduceProdKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|BatchNormalization|TestBatchnormEpsilon|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Reciprocal|TestReciprocal|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|OneHot|TestOnehotWithoutAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|NonMaxSuppression|TestNonmaxsuppressionFlippedCoordinates|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|OneHot|TestOnehotWithAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1DefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DefaultAxesKeepdimsRandom|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL1|TestReduceL1KeepDimsRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool1dDefault|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpoolWithArgmax2dPrecomputedStrides|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConstantOfShape|TestConstantofshapeIntZeros|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeUpsampleNearest|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Constant|TestConstant|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitEqualPartsDefaultAxis|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pad|TestEdgePad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MatMul|TestMatmul4d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|InstanceNormalization|TestInstancenormExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDoNotKeepdimsExample|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations1|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxUnpool|TestMaxunpoolExportWithoutOutputShape|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpool3dDefault|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Elu|TestEluExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LeakyRelu|TestLeakyreluExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|PRelu|TestPreluBroadcast|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|HardSigmoid|TestHardsigmoidExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConstantOfShape|TestConstantofshapeFloatOnes|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPadsCountIncludePad|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSum|TestReduceSumDoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxDefaultAxesKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeDownsampleLinear|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool1dDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tan|TestTan|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitVariableParts2d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MeanVarianceNormalization|TestMvn|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Acos|TestAcos|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Constant|TestConstant|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ThresholdedRelu|TestThresholdedrelu|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceLogSumExp|TestReduceLogSumExpDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cosh|TestCosh|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Conv|TestConvWithStridesAndAsymmetricPadding|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mod|TestModInt64Fmod|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Erf|TestErf|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxNoKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceSumSquare|TestReduceSumSquareDefaultAxesKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|AveragePool|TestAveragepool2dPrecomputedPads|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ArgMax|TestArgmaxDefaultAxisRandom|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Transpose|TestTransposeAllPermutations2|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Selu|TestSelu|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|GlobalMaxPool|TestGlobalmaxpool|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Asinh|TestAsinh|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Cosh|TestCoshExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfBatchUniandbigramsSkip5|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeWithKernel|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxPool|TestMaxpoolWithArgmax2dPrecomputedStrides|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|InstanceNormalization|TestInstancenormEpsilon|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|NonMaxSuppression|TestNonmaxsuppressionLimitOutputSize|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinDoNotKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Upsample|TestUpsampleNearest|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceL2|TestReduceL2DefaultAxesKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Pow|TestPowExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReverseSequence|TestReversesequenceBatch|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfOnlybigramsSkip5|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Min|TestMinExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Scatter|TestScatterWithAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMin|TestReduceMinKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Mod|TestModBroadcast|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LRN|TestLrn|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Split|TestSplitVariablePartsDefaultAxis|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxKeepdimsRandom|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Tile|TestTilePrecomputed|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ThresholdedRelu|TestThresholdedreluDefault|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtranspose1d|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Sum|TestSumExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Elu|TestElu|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ConvTranspose|TestConvtransposeKernelShape|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|EyeLike|TestEyelikePopulateOffMainDiagonal|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Hardmax|TestHardmaxDefaultAxis|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|PRelu|TestPreluExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Resize|TestResizeNearest|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipOutbounds|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|MaxUnpool|TestMaxunpoolExportWithOutputShape|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMax|TestReduceMaxKeepdimsExample|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Softsign|TestSoftsignExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|LeakyRelu|TestLeakyrelu|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|ReduceMean|TestReduceMeanDoNotKeepdimsExample|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|TfIdfVectorizer|TestTfidfvectorizerTfOnlyBigramsSkip0|true|true|false| |![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Clip|TestClipDefaultMin|true|true|false| -|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Flatten|TestFlattenAxis0|true|true|false| +|![#ffa500](https://placehold.it/15/FFA500/000000?text=+)|Size|TestSizeExample|true|true|false| From 58d00192945fdc0ff37226e528dcb2de0c1e77ea Mon Sep 17 00:00:00 2001 From: Olivier Wulveryck Date: Wed, 22 May 2019 14:18:46 +0200 Subject: [PATCH 6/7] feat: only cover the main package --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 84258941..81e941d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,4 @@ before_install: script: - go test ./... - - $GOPATH/bin/goveralls -service=travis-ci + - $GOPATH/bin/goveralls -service=travis-ci -package github.com/owulveryck/onnx-go From b498b4e49c646b187571b8dbc21f53581a1c007a Mon Sep 17 00:00:00 2001 From: Olivier Wulveryck Date: Mon, 27 May 2019 15:26:53 +0200 Subject: [PATCH 7/7] feat: simple bench with MNIST for evaluation purpose --- bench_test.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 bench_test.go diff --git a/bench_test.go b/bench_test.go new file mode 100644 index 00000000..8b5e6465 --- /dev/null +++ b/bench_test.go @@ -0,0 +1,33 @@ +package onnx_test + +import ( + "testing" + + "github.com/owulveryck/onnx-go" + "github.com/owulveryck/onnx-go/backend/x/gorgonnx" + "github.com/owulveryck/onnx-go/internal/examples/mnist" + "gorgonia.org/tensor" +) + +func BenchmarkUnmarshalBinary(b *testing.B) { + for n := 0; n < b.N; n++ { + // Create a backend receiver + backend := gorgonnx.NewGraph() + // Create a model and set the execution backend + model := onnx.NewModel(backend) + + // Decode it into the model + err := model.UnmarshalBinary(mnist.GetMnist()) + if err != nil { + b.Fatal(err) + } + // Set the first input, the number depends of the model + input := tensor.New(tensor.WithShape(1, 1, 28, 28), tensor.Of(tensor.Float32)) + model.SetInput(0, input) + err = backend.Run() + if err != nil { + b.Fatal(err) + } + // Check error + } +}