cog-imperial / OMLT

Represent trained machine learning models as Pyomo optimization formulations
Other
271 stars 57 forks source link

Test ConvLayer #51

Closed fracek closed 2 years ago

fracek commented 2 years ago

I added a test for convolutional layers. In this case I compute the expected values on the fly (instead of hard-coding them like in other tests) because it would be too messy to hard-code the 7x7 input and 5x5 output.

codecov[bot] commented 2 years ago

Codecov Report

Merging #51 (ffbf211) into main (04e0232) will increase coverage by 3.00%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
+ Coverage   91.14%   94.15%   +3.00%     
==========================================
  Files          24       24              
  Lines        1231     1231              
  Branches      186      186              
==========================================
+ Hits         1122     1159      +37     
+ Misses         80       42      -38     
- Partials       29       30       +1     
Impacted Files Coverage Δ
src/omlt/neuralnet/layer.py 90.57% <0.00%> (+16.66%) :arrow_up:
src/omlt/neuralnet/layers/full_space.py 100.00% <0.00%> (+41.17%) :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 04e0232...ffbf211. Read the comment docs.