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
720 stars 71 forks source link

Implement Shape operator #179

Closed vovapi closed 4 years ago

vovapi commented 4 years ago

This implements Shape operator. It just converts gorgornia's Node shape into a new constant Node.

This seems to be working for me, but it still needs testing. I'm not yet familiar with the project's codebase, but I think that there are some tests for Shape already written (but probably disabled?). I need help with that.

owulveryck commented 4 years ago

Hello;

I have a look at it in a couple of days (hopefully Sunday). Many thanks for you PR.

Olivier

codecov[bot] commented 4 years ago

Codecov Report

Merging #179 into master will decrease coverage by 0.01%. The diff coverage is 73.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #179      +/-   ##
==========================================
- Coverage   87.11%   87.09%   -0.02%     
==========================================
  Files         395      396       +1     
  Lines       10454    10469      +15     
==========================================
+ Hits         9107     9118      +11     
- Misses       1156     1158       +2     
- Partials      191      193       +2     
Impacted Files Coverage Δ
backend/x/gorgonnx/shape.go 73.33% <73.33%> (ø)

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 60867b8...8c4519b. Read the comment docs.

owulveryck commented 4 years ago

LGTM. I am applying the PR, but as of today, I have some issues with the latest version of Gorgonia. It may not work as expected.

I will have a look as soon as I have time