oramasearch / onnx-go

onnx-go gives the ability to import a pre-trained neural network within Go without being linked to a framework or library.
https://blog.owulveryck.info/2019/04/03/from-a-project-to-a-product-the-state-of-onnx-go.html
MIT License
704 stars 72 forks source link

refactor(backend/x/gorgonnx): reduce cyclomatic complexity #157

Closed rlespinasse closed 5 years ago

rlespinasse commented 5 years ago

With reduction of cyclomatic complexities in

Also fix a bug on wrongful broadcast when node a shape is equals to 0.

Linked to #130

codecov[bot] commented 5 years ago

Codecov Report

Merging #157 into master will increase coverage by 0.31%. The diff coverage is 63.2%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
+ Coverage   86.47%   86.78%   +0.31%     
==========================================
  Files         395      395              
  Lines       10504    10525      +21     
==========================================
+ Hits         9083     9134      +51     
+ Misses       1224     1194      -30     
  Partials      197      197
Impacted Files Coverage Δ
backend/x/gorgonnx/maxpool.go 87.76% <100%> (+2.55%) :arrow_up:
backend/x/gorgonnx/gap.go 48.51% <32.35%> (-2.04%) :arrow_down:
backend/x/gorgonnx/gemm.go 77.83% <46.66%> (+1.73%) :arrow_up:
backend/x/gorgonnx/broadcast.go 61.4% <61.53%> (+26.33%) :arrow_up:
backend/x/gorgonnx/batchnorm_op.go 70.21% <71.42%> (+1.67%) :arrow_up:
backend/x/gorgonnx/conv.go 53.09% <90.9%> (+6.3%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c00c5d7...1f89d2c. Read the comment docs.