Skip to content

[Refactor] PyTorch SAR_Resnet31 make it ONNX exportable (again) #930

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

Merged
merged 2 commits into from
May 30, 2022

Conversation

felixdittrich92
Copy link
Contributor

@felixdittrich92 felixdittrich92 commented May 25, 2022

This PR:

  • reverts pooling to fix onnx export (retrained with same results as before)
  • set attention units to 512 as described in paper (fix my mistake ^^)
  • some formatting / docu

Any feedback is welcome 🤗

(functional pooling has raised some ONNX export issues)

@felixdittrich92 felixdittrich92 requested a review from frgfm May 25, 2022 21:55
@felixdittrich92 felixdittrich92 self-assigned this May 25, 2022
@felixdittrich92 felixdittrich92 added module: models Related to doctr.models framework: pytorch Related to PyTorch backend topic: text recognition Related to the task of text recognition topic: onnx ONNX-related type: code quality Related to code quality labels May 25, 2022
@felixdittrich92 felixdittrich92 changed the title [Refactor] PyTorch SAR_Resnet31 make it ONNX exportable [Refactor] PyTorch SAR_Resnet31 make it ONNX exportable (again) May 25, 2022
@codecov
Copy link

codecov bot commented May 25, 2022

Codecov Report

Merging #930 (d92ba7b) into main (0c8dd60) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #930      +/-   ##
==========================================
+ Coverage   94.68%   94.69%   +0.01%     
==========================================
  Files         134      134              
  Lines        5491     5490       -1     
==========================================
  Hits         5199     5199              
+ Misses        292      291       -1     
Flag Coverage Δ
unittests 94.69% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
doctr/models/recognition/sar/pytorch.py 98.50% <100.00%> (-0.02%) ⬇️
doctr/transforms/functional/base.py 97.10% <0.00%> (+1.44%) ⬆️

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 0c8dd60...d92ba7b. Read the comment docs.

Copy link
Collaborator

@frgfm frgfm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Felix! Just a small comment perhaps?

@felixdittrich92 felixdittrich92 requested a review from frgfm May 30, 2022 10:56
Copy link
Collaborator

@frgfm frgfm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@frgfm frgfm added the type: enhancement Improvement label May 30, 2022
@frgfm frgfm merged commit c04f0d0 into mindee:main May 30, 2022
@felixdittrich92 felixdittrich92 deleted the fix-onnx-ptsar branch May 30, 2022 13:21
@felixdittrich92 felixdittrich92 added this to the 0.6.0 milestone Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework: pytorch Related to PyTorch backend module: models Related to doctr.models topic: onnx ONNX-related topic: text recognition Related to the task of text recognition type: code quality Related to code quality type: enhancement Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants