Commit Graph

36 Commits

Author SHA1 Message Date
nihui 8a84077429 ncnnoptimize lstm 2020-03-15 11:56:23 +08:00
nihui dba992c15c ncnnoptimize add pixelshuffle, fix #1608 2020-03-12 20:54:50 +08:00
nihui 0f7e7bca02 shader shape specialization constant and basic local group size partition (#1523)
* use Mat class for Shape description

* shape specialization constant in compute shader

* wip

* wip

* test forward_inplace, add binaryop unaryop sigmoid test

* fix arm unaryop test

* fix arm binaryop test

* make shape hint optional, cast int8 to fp32, add cast test

* wip

* follow the good and old local size setting for conv1x1

* the optimal local size rewrite

* fix build on msvc

* add permute shader for all packing layout, add permute test

* concat and slice patial shape constant, slice test

* fix slice test

* interp test

* add lrn test, test packing layout implicitly

* add eltwise test

* add normalize test

* add instancenorm test

* reorg shape constant

* simple local group size partition

* add shape constant param
2020-02-17 15:45:29 +08:00
kalcohol 01853010ea type conversion and MSVC _CRT_SECURE_NO_DEPRECATE warning fix (#1524)
* fix type conversion warning

* fix MSVC _CRT_SECURE_NO_DEPRECATE warning

* type conversion: missing one

* fix  MSVC _CRT_SECURE_NO_DEPRECATE warning and type warning

* reformat

* convert google::protobuf::int64 to size_t to avoid type impl between msvc and gcc gap

* remove C++11 auto

* tab -> space
2020-02-07 14:33:01 +08:00
nihui e2bd4eae6e write shape as 4-number tuple 2020-01-31 12:34:57 +08:00
nihui 6cefaad957 ncnnoptimize shape inference, load shape hint 2020-01-30 16:33:44 +08:00
Sungmann Cho 447b1369f5 Fix warnings on Visual Studio (#1422)
* Change DataReader::read()'s signature to fix warning C4267

This CL fixes lots of warning "C4267: 'initializing': conversion from
'size_t' to 'int'" in our codebase by matching DataReader::read()'s
signature to fread().

* Fix warnings C4244 and C4267 in tools/ncnnoptimize.cpp

C4244: 'initializing': conversion from 'double' to 'float',
    possible loss of data
C4267: 'initializing': conversion from 'size_t' to 'int',
    possible loss of data

* Fix warning C4244 in src\layer\selu.cpp

C4244: '=': conversion from 'double' to 'float', possible loss of data

* Fix warning C4244 in src\layer\cast.cpp

C4244: '=': conversion from 'double' to 'float', possible loss of data
C4244: 'return': conversion from 'float' to 'signed char', possible loss of data

* Fix warning C4244 in src\layer\psroipooling.cpp

C4244: 'initializing': conversion from 'double' to 'float',
    possible loss of data
C4244: 'initializing': conversion from 'double' to 'int',
    possible loss of data
2019-12-13 16:19:13 +08:00
nihuini d8b0f28dda optimizer eliminate orphaned memorydata 2019-11-15 19:15:18 +08:00
nihuini 5eae1b8325 always write normalize scale data, do not break optimize tool 2019-11-15 17:26:02 +08:00
nihuini d430f1e1fe eliminate noop pooling1x1s1 2019-11-15 15:07:59 +08:00
Guoxia Wang 5c08ce7db9 fix Reduction Op attr bug (#1363)
* fix onnx2ncnn MemoryData dims problem #1330

* fix ncnn2int8 bug (see #1336)

* fix bug that MemoryData as multi operations input

* fix ncnn2table find_blob_index_by_name data failed bug, see #1338

* fix ncnn2table find_blob_index_by_name data failed bug, see #1338, fix change requested

* fix Reduction operation attribution bug

* fix #1363 request changes
2019-11-08 14:09:59 +08:00
nihui ced7bcbadc fix eliminating noop with empty bottom or top blobs 2019-11-04 22:05:32 +08:00
ShuangLiu1992 3b905cb48a fix ncnnoptimize bias term bug #1339 (#1340) 2019-10-29 07:39:31 +08:00
nihuini 64333429bb data reader wrapper, fix #1325 2019-10-25 19:18:40 +08:00
nihuini e8bb88830d convert mxnet squeeze expanddims, convert onnx squeeze unsqueeze 2019-10-24 11:29:14 +08:00
nihuini a6c60068e6 convert numpy style slice to crop 2019-10-23 19:43:11 +08:00
bindog 04b4b02324 [WIP] add reduce op support for onnx (#1308)
* [WIP] add reduce op support for onnx

* extend reduction to support 1,2-dim reduction and keepdims

* fix compile error

* split type to 3 flags && split keepdims to another function
2019-10-22 12:53:12 +08:00
nihuini 87ae1e9a2a %e in ncnnoptimize 2019-09-27 14:49:24 +08:00
nihuini 583f0a7c2f eliminate noop 2019-09-26 14:43:22 +08:00
nihuini f7808b2dfc write pad_value 2019-09-19 11:12:28 +08:00
nihuini d67d2531ae convert some well-known noop, printf %g to preserve precision 2019-09-18 16:42:46 +08:00
nihui 3eb30f4cdb write deconvolution output pad and output shape, write instancenorm weight, fix #1053 fix #1122 2019-08-21 21:36:52 +08:00
nihuini 9a6ee37eef asymmetric padding parameter for convolution and deconvolution family 2019-08-20 15:04:15 +08:00
nihui 49206ea03c eliminate useless reshape for mbv3 2019-08-19 23:44:59 +08:00
xunings 481fe0808a Write necessary data for memorydata in ncnnoptimize. (#1194) 2019-08-17 10:11:38 +08:00
Howave a2647b5d29 Fix for MemoryData params in ncnn optimize tool (#1188) 2019-08-13 19:00:09 +08:00
tpoisonooo 1ca4387c9c Auto choose conv implementation (#1085)
* add relative README_CN.md;
* obtain time cost with op->forward().
2019-07-18 16:47:14 +08:00
nihui 07260527fc fix activation params 2019-05-12 12:33:15 +08:00
nihui 3e003ffd98 fuse sigmoid 2019-05-11 11:06:10 +08:00
nihuini ed2e441a1d fix write fp16 weight with tag 2019-04-30 10:16:12 +08:00
nihuini 81fda4d6d7 ncnnoptimize save fp16 storage weight 2019-04-29 15:56:05 +08:00
nihuini 48a1cb4052 more optimize routines ... 2019-04-28 15:11:46 +08:00
nihui 99b81b2ee9 eliminate dropout 2019-04-26 21:47:41 +08:00
nihuini 3f85cafc08 fuse relu leakyrelu clip into convolution/deconvolution/innerproduct 2019-04-26 18:59:37 +08:00
nihuini 5e98a8799c fuse deconvolution batchnorm 2019-04-24 19:34:24 +08:00
nihuini 7984ffcb4d ncnnoptimize tool 2019-04-24 19:08:34 +08:00