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 GPU support for classification and improve memory pinning #629

Merged
merged 3 commits into from
Nov 16, 2021

Conversation

fg-mindee
Copy link
Contributor

This PR introduces the following modifications:

  • removes unnecessary metric reset (it's already done at the beginning of evaluate)
  • added missing support of GPU for character classification in PyTorch
  • improved memory pinning for CPU training (if "True" it preallocates the memory on GPU, but in case of CPU training, we don't want that)

Any feedback is welcome!

@fg-mindee fg-mindee added ext: references Related to references folder topic: text detection Related to the task of text detection topic: text recognition Related to the task of text recognition topic: character classification Related to the task of character classification labels Nov 16, 2021
@fg-mindee fg-mindee added this to the 0.4.1 milestone Nov 16, 2021
@fg-mindee fg-mindee self-assigned this Nov 16, 2021
@fg-mindee fg-mindee added type: enhancement Improvement framework: pytorch Related to PyTorch backend labels Nov 16, 2021
Copy link
Collaborator

@charlesmindee charlesmindee left a comment

Choose a reason for hiding this comment

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

Thanks!

@codecov
Copy link

codecov bot commented Nov 16, 2021

Codecov Report

Merging #629 (e7f10f6) into main (fc22516) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #629      +/-   ##
==========================================
+ Coverage   96.05%   96.07%   +0.02%     
==========================================
  Files         112      112              
  Lines        4359     4359              
==========================================
+ Hits         4187     4188       +1     
+ Misses        172      171       -1     
Flag Coverage Δ
unittests 96.07% <ø> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
...dels/detection/differentiable_binarization/base.py 91.82% <0.00%> (+0.62%) ⬆️

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 fc22516...e7f10f6. Read the comment docs.

@fg-mindee fg-mindee merged commit 16d842e into main Nov 16, 2021
@fg-mindee fg-mindee deleted the train-optim branch November 16, 2021 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext: references Related to references folder framework: pytorch Related to PyTorch backend topic: character classification Related to the task of character classification topic: text detection Related to the task of text detection topic: text recognition Related to the task of text recognition type: enhancement Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants