/
onnx_test_cos.go
50 lines (39 loc) · 2.71 KB
/
onnx_test_cos.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
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("Cos", "TestCos", NewTestCos)
}
// NewTestCos version: 3.
func NewTestCos() *testbackend.TestCase {
return &testbackend.TestCase{
OpType: "Cos",
Title: "TestCos",
ModelB: []byte{0x8, 0x3, 0x12, 0xc, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2d, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x49, 0xa, 0xb, 0xa, 0x1, 0x78, 0x12, 0x1, 0x79, 0x22, 0x3, 0x43, 0x6f, 0x73, 0x12, 0x8, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x73, 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, 0x17, 0xa, 0x1, 0x79, 0x12, 0x12, 0xa, 0x10, 0x8, 0x1, 0x12, 0xc, 0xa, 0x2, 0x8, 0x3, 0xa, 0x2, 0x8, 0x4, 0xa, 0x2, 0x8, 0x5, 0x42, 0x2, 0x10, 0x9},
/*
&ir.NodeProto{
Input: []string{"x"},
Output: []string{"y"},
Name: "",
OpType: "Cos",
Attributes: ([]*ir.AttributeProto) <nil>
,
},
*/
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(3, 4, 5),
tensor.WithBacking([]float32{-0.19205536, 0.92099977, 0.5580702, -0.62106186, -0.29242498, 0.5592812, 0.58161116, 0.98856735, 0.99467766, 0.9168821, 0.98964363, 0.11625936, 0.72412074, 0.9926067, 0.9030994, 0.9448453, 0.076641984, 0.97902876, 0.95139325, 0.6569006, -0.83171713, 0.7938887, 0.64906913, 0.73700696, -0.64342064, 0.11616772, 0.9989533, 0.9825322, 0.038007952, 0.10126366, 0.98801965, 0.9293446, 0.6311311, -0.39860946, 0.9400866, 0.9878024, 0.33396378, 0.36013865, 0.9259221, 0.95465344, 0.4988257, 0.15020771, -0.13505988, -0.37090102, 0.87291425, 0.9055702, 0.3126684, 0.7126763, -0.04308813, 0.977456, 0.62515473, 0.92608225, 0.87235117, 0.3803402, 0.9996029, 0.90965986, 0.99778855, 0.9546031, 0.8054736, 0.93492764}),
),
},
}
}