raoulritter
commited on
Commit
·
93ee614
1
Parent(s):
62bd691
Upload 14 files
Browse files- .gitattributes +8 -0
- 20x/debug.bin +3 -0
- 20x/debug.param +0 -0
- 20x/debug2.bin +3 -0
- 20x/debug2.param +0 -0
- 20x/modelpnnx20x.ncnn.bin +3 -0
- 20x/modelpnnx20x.ncnn.param +0 -0
- 20x/modelpnnx20x.pnnx.bin +3 -0
- 20x/modelpnnx20x.pnnx.onnx +3 -0
- 20x/modelpnnx20x.pnnx.param +0 -0
- 20x/modelpnnx20x.pt +3 -0
- 20x/modelpnnx20x_float.pt +3 -0
- 20x/modelpnnx20x_ncnn.py +31 -0
- 20x/modelpnnx20x_pnnx.py +0 -0
- 20x/modelpnnx50x.pt +3 -0
.gitattributes
CHANGED
@@ -22,3 +22,11 @@ ckpt/model_float16.tflite filter=lfs diff=lfs merge=lfs -text
|
|
22 |
ckpt/model_float32.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
ckpt/model5x50.onnx filter=lfs diff=lfs merge=lfs -text
|
24 |
ckpt/saved_model.pb filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
ckpt/model_float32.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
ckpt/model5x50.onnx filter=lfs diff=lfs merge=lfs -text
|
24 |
ckpt/saved_model.pb filter=lfs diff=lfs merge=lfs -text
|
25 |
+
20x/debug.bin filter=lfs diff=lfs merge=lfs -text
|
26 |
+
20x/debug2.bin filter=lfs diff=lfs merge=lfs -text
|
27 |
+
20x/modelpnnx20x_float.pt filter=lfs diff=lfs merge=lfs -text
|
28 |
+
20x/modelpnnx20x.ncnn.bin filter=lfs diff=lfs merge=lfs -text
|
29 |
+
20x/modelpnnx20x.pnnx.bin filter=lfs diff=lfs merge=lfs -text
|
30 |
+
20x/modelpnnx20x.pnnx.onnx filter=lfs diff=lfs merge=lfs -text
|
31 |
+
20x/modelpnnx20x.pt filter=lfs diff=lfs merge=lfs -text
|
32 |
+
20x/modelpnnx50x.pt filter=lfs diff=lfs merge=lfs -text
|
20x/debug.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3224be077230488f38918a022fa31634f6c69e33d9e00d739f5b097a63b4b4fc
|
3 |
+
size 213434872
|
20x/debug.param
ADDED
The diff for this file is too large to render.
See raw diff
|
|
20x/debug2.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:83bd07981deb80493d5d291c03cbe86b7a45868672fc94be669faad4044b8772
|
3 |
+
size 213401460
|
20x/debug2.param
ADDED
The diff for this file is too large to render.
See raw diff
|
|
20x/modelpnnx20x.ncnn.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0b8f14d19799c39fce865e7637fd96ebe9e5a361fe95f89112dfd22bba949f4a
|
3 |
+
size 133294028
|
20x/modelpnnx20x.ncnn.param
ADDED
The diff for this file is too large to render.
See raw diff
|
|
20x/modelpnnx20x.pnnx.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b7e6b65006b94e2ccec8fbaa268cd14492b82aecb5ab53d2cd97ebef52fd3f77
|
3 |
+
size 221641234
|
20x/modelpnnx20x.pnnx.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bbe2b8a3e9f7da5275209c554921343b1c128d981f3a6fc040bcd890ba6da0ad
|
3 |
+
size 111237962
|
20x/modelpnnx20x.pnnx.param
ADDED
The diff for this file is too large to render.
See raw diff
|
|
20x/modelpnnx20x.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:507cafbcef26b2e0cdd00c6ae7709e65a9b5a8dfa83b8cae7043e93409f1c25c
|
3 |
+
size 151706608
|
20x/modelpnnx20x_float.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:67b228fef8cc7ac8cce4d77b41c774e7f6df733a5d8eabf9965ad9a88608695e
|
3 |
+
size 151716342
|
20x/modelpnnx20x_ncnn.py
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
import ncnn
|
3 |
+
import torch
|
4 |
+
|
5 |
+
def test_inference():
|
6 |
+
torch.manual_seed(0)
|
7 |
+
in0 = torch.rand(1, 3, 384, 384, dtype=torch.float)
|
8 |
+
in1 = torch.rand(1, 3, 384, 384, dtype=torch.float)
|
9 |
+
out = []
|
10 |
+
|
11 |
+
with ncnn.Net() as net:
|
12 |
+
net.load_param("/Users/raoulritter/STB-VMM/20x/modelpnnx20x.ncnn.param")
|
13 |
+
net.load_model("/Users/raoulritter/STB-VMM/20x/modelpnnx20x.ncnn.bin")
|
14 |
+
|
15 |
+
with net.create_extractor() as ex:
|
16 |
+
ex.input("in0", ncnn.Mat(in0.squeeze(0).numpy()).clone())
|
17 |
+
ex.input("in1", ncnn.Mat(in1.squeeze(0).numpy()).clone())
|
18 |
+
|
19 |
+
_, out0 = ex.extract("out0")
|
20 |
+
out.append(torch.from_numpy(np.array(out0)).unsqueeze(0))
|
21 |
+
_, out1 = ex.extract("out1")
|
22 |
+
out.append(torch.from_numpy(np.array(out1)).unsqueeze(0))
|
23 |
+
_, out2 = ex.extract("out2")
|
24 |
+
out.append(torch.from_numpy(np.array(out2)).unsqueeze(0))
|
25 |
+
_, out3 = ex.extract("out3")
|
26 |
+
out.append(torch.from_numpy(np.array(out3)))
|
27 |
+
|
28 |
+
if len(out) == 1:
|
29 |
+
return out[0]
|
30 |
+
else:
|
31 |
+
return tuple(out)
|
20x/modelpnnx20x_pnnx.py
ADDED
The diff for this file is too large to render.
See raw diff
|
|
20x/modelpnnx50x.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:aa56f56688b0cca51e5d7021717f0c7dc3b82caba7b5c51689aaecf220f5b037
|
3 |
+
size 151689558
|