-
Notifications
You must be signed in to change notification settings - Fork 4
/
Thoughts.txt
73 lines (64 loc) · 1.85 KB
/
Thoughts.txt
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
TODO:
Update command line syntax to be more flexible, like ImageMagick
e.g. convertonnxmodel convert (dataType:float32 dimensions:[256,256,3,1] strides:ONNX dimensionSemantics:NCHW input:foo.dat) cast:float32 scale:255 normalize:true output:bar.dat
convertonnxmodel convert dataType:float32 dimensions:[256,256,3,1] strides:ONNX foo.dat cast:float32 scale:255 normalize:true bar.dat
TODO: Print more detailed input and output information.
convertonnxmodel convert input.onnxtensor cast:float32 normalize:true scale:255 layout:WHC strides:increasing output.bin
input:{
file:"input.onnxtensor"
name:"MulWeights_42"
datatype:uint8
dimensions:[3,240,320]
strides:[307200,320,1] // decreasing ONNX
layout:CHW
}
operations:{
cast:float32
normalize:true
scale:255
}
output:{
file:"output.bin"
datatype:float32
dimensions:[320,240,3]
strides:[1,3,640]
layout:WHC
}
convertonnxmodel convert input.onnxtensor output.png
input:{
file:"input.onnxtensor"
datatype:uint8
dimensions:[3,240,320]
strides:[307200,320,1] // decreasing
layout:CHW
}
operations:{
cast:uint8
}
output:{
file:"output.png"
datatype:uint8
dimensions:[3,320,240]
bytestrides:[1,3,640] // increasing
layout:CWH
}
convertonnxmodel convert input.csv size:3,320,240 output.png
input:{
file:"input.csv"
datatype:uint8
dimensions:[230400]
strides:[1] // increasing
layout:_
}
operations:{
cast:uint8 // implicit
reshape:{size:[3,320,240] strides:increasing} // implicit
}
output:{
file:"output.png"
datatype:uint8
dimensions:[3,320,240]
strides:[1,3,640] // increasing
layout:CWH
}
See Protobuf CMake here: https://www.reddit.com/r/cpp/comments/17v0tui/exploring_cmake_and_protobuf_my_tiny_project_for/