|
|
|
@@ -185,4 +185,13 @@ ncnn::Net net; |
|
|
|
net.opt.use_fp16_packed = false; |
|
|
|
net.opt.use_fp16_storage = false; |
|
|
|
net.opt.use_fp16_arithmetic = false; |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
### make data contiguous |
|
|
|
If you find the output of pnnx.py and ncnn.py (generated by pnnx) is different, This may be due to data discontiguous. You can set the ncnn.py as follows and moditfity other codes: |
|
|
|
``` python |
|
|
|
def test_inference(): |
|
|
|
torch.manual_seed(0) |
|
|
|
in0 = torch.rand(1, 3, 224, 224, dtype=torch.float) |
|
|
|
in0.contiguous() |
|
|
|
``` |