Closed frgfm closed 4 years ago
Merging #24 into master will decrease coverage by
0.28%
. The diff coverage is82.27%
.
@@ Coverage Diff @@
## master #24 +/- ##
==========================================
- Coverage 89.75% 89.46% -0.29%
==========================================
Files 9 9
Lines 527 560 +33
==========================================
+ Hits 473 501 +28
- Misses 54 59 +5
Impacted Files | Coverage Δ | |
---|---|---|
torchscan/crawler.py | 82.08% <80.55%> (+0.18%) |
:arrow_up: |
torchscan/modules/flops.py | 99.01% <100.00%> (ø) |
|
torchscan/modules/macs.py | 100.00% <100.00%> (ø) |
|
torchscan/modules/memory.py | 100.00% <100.00%> (ø) |
|
torchscan/modules/receptive.py | 100.00% <100.00%> (ø) |
This PR handles the cases where a single module is reused multiple times. The issue was that with the initial hooking mechanism, the module gets hooked N times, and upon the forward pass, it will trigger N hooks each time the module is used. This was handled by:
torch.nn.Flatten