cog-imperial / OMLT

Represent trained machine learning models as Pyomo optimization formulations
Other
281 stars 59 forks source link

Adding tanh and softplus to onnx_parser #113

Closed juan-campos closed 1 year ago

juan-campos commented 1 year ago

Legal Acknowledgement\ By contributing to this software project, I agree my contributions are submitted under the BSD license. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

In line 15 of onnx_parser.py the Tanh and Softplus activations were missing, and adding a conditional to check if matrix B needs to be transposed for gemm nodes.

codecov[bot] commented 1 year ago

Codecov Report

Merging #113 (5f4d847) into main (973b041) will increase coverage by 0.36%. Report is 1 commits behind head on main. The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main     #113      +/-   ##
==========================================
+ Coverage   94.97%   95.33%   +0.36%     
==========================================
  Files          26       26              
  Lines        1372     1371       -1     
  Branches      191      193       +2     
==========================================
+ Hits         1303     1307       +4     
+ Misses         37       34       -3     
+ Partials       32       30       -2     
Files Changed Coverage Δ
src/omlt/io/onnx_parser.py 97.14% <66.66%> (ø)

... and 7 files with indirect coverage changes