Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added FLOPS estimation support for nn.Transformer #48

Merged
merged 7 commits into from
Jul 11, 2021

Conversation

frgfm
Copy link
Owner

@frgfm frgfm commented Jul 11, 2021

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

  • optimized FLOPS estimation function signature
  • added support for torch.nn.Transformer
  • updated unittests accordingly

@frgfm frgfm added type: improvement New feature or request module: modules Related to modules labels Jul 11, 2021
@frgfm frgfm added this to the 0.1.2 milestone Jul 11, 2021
@frgfm frgfm self-assigned this Jul 11, 2021
@codecov
Copy link

codecov bot commented Jul 11, 2021

Codecov Report

Merging #48 (7c03cc1) into master (de4472e) will increase coverage by 0.42%.
The diff coverage is 97.32%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #48      +/-   ##
==========================================
+ Coverage   89.93%   90.35%   +0.42%     
==========================================
  Files          10       10              
  Lines         616      674      +58     
==========================================
+ Hits          554      609      +55     
- Misses         62       65       +3     
Impacted Files Coverage Δ
torchscan/modules/flops.py 97.57% <97.19%> (-1.49%) ⬇️
torchscan/crawler.py 82.08% <100.00%> (ø)

@frgfm frgfm merged commit 61116d9 into master Jul 11, 2021
@frgfm frgfm deleted the transformer-flops branch July 11, 2021 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: modules Related to modules type: improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant