frgfm / torch-scan

Seamless analysis of your PyTorch models (RAM usage, FLOPs, MACs, receptive field, etc.)
https://frgfm.github.io/torch-scan/latest
Apache License 2.0
208 stars 22 forks source link

fix: Fixed MAC/FLOP computation for Linear in higher dimensions #52

Closed frgfm closed 2 years ago

frgfm commented 2 years ago

Following up on #50, this PR introduces the following modifications:

Closes #50

codecov[bot] commented 2 years ago

Codecov Report

Merging #52 (e4d2829) into master (61116d9) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
+ Coverage   90.35%   90.37%   +0.01%     
==========================================
  Files          10       10              
  Lines         674      675       +1     
==========================================
+ Hits          609      610       +1     
  Misses         65       65              
Impacted Files Coverage Δ
torchscan/crawler.py 82.08% <ø> (ø)
torchscan/modules/flops.py 97.59% <100.00%> (+0.01%) :arrow_up:
torchscan/modules/macs.py 100.00% <100.00%> (ø)