forked from owulveryck/onnx-go
/
onnx_test_reduce_sum_square_do_not_keepdims_random.go
53 lines (42 loc) · 2.4 KB
/
onnx_test_reduce_sum_square_do_not_keepdims_random.go
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package onnxtest
// this file is auto-generated... DO NOT EDIT
import (
"github.com/godshen/onnx-go/backend/testbackend"
"gorgonia.org/tensor"
)
func init() {
testbackend.Register("ReduceSumSquare", "TestReduceSumSquareDoNotKeepdimsRandom", NewTestReduceSumSquareDoNotKeepdimsRandom)
}
// NewTestReduceSumSquareDoNotKeepdimsRandom version: 3.
func NewTestReduceSumSquareDoNotKeepdimsRandom() *testbackend.TestCase {
return &testbackend.TestCase{
OpType: "ReduceSumSquare",
Title: "TestReduceSumSquareDoNotKeepdimsRandom",
ModelB: []byte{0x8, 0x3, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0xa6, 0x1, 0xa, 0x3e, 0xa, 0x4, 0x64, 0x61, 0x74, 0x61, 0x12, 0x7, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x64, 0x22, 0xf, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x53, 0x75, 0x6d, 0x53, 0x71, 0x75, 0x61, 0x72, 0x65, 0x2a, 0xb, 0xa, 0x4, 0x61, 0x78, 0x65, 0x73, 0x40, 0x1, 0xa0, 0x1, 0x7, 0x2a, 0xf, 0xa, 0x8, 0x6b, 0x65, 0x65, 0x70, 0x64, 0x69, 0x6d, 0x73, 0x18, 0x0, 0xa0, 0x1, 0x2, 0x12, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5f, 0x73, 0x75, 0x6d, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x5f, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x64, 0x69, 0x6d, 0x73, 0x5f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5a, 0x1a, 0xa, 0x4, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x2, 0xa, 0x2, 0x8, 0x2, 0x62, 0x19, 0xa, 0x7, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x64, 0x12, 0xe, 0xa, 0xc, 0x8, 0x1, 0x12, 0x8, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x2, 0x42, 0x2, 0x10, 0x9},
/*
&ir.NodeProto{
Input: []string{"data"},
Output: []string{"reduced"},
Name: "",
OpType: "ReduceSumSquare",
Attributes: ([]*ir.AttributeProto) (len=2 cap=2) {
(*ir.AttributeProto)(0xc0001f1d00)(name:"axes" type:INTS ints:1 ),
(*ir.AttributeProto)(0xc0001f1e00)(name:"keepdims" type:INT )
}
,
},
*/
Input: []tensor.Tensor{
tensor.New(
tensor.WithShape(3, 2, 2),
tensor.WithBacking([]float32{0.9762701, 4.303787, 2.0552676, 0.89766365, -1.526904, 2.9178822, -1.2482557, 7.83546, 9.273255, -2.3311696, 5.834501, 0.5778984}),
),
},
ExpectedOutput: []tensor.Tensor{
tensor.New(
tensor.WithShape(3, 2),
tensor.WithBacking([]float32{5.177228, 19.328384, 3.889578, 69.90847, 120.03467, 5.7683187}),
),
},
}
}