Skip to content

Implement dropout#4554

Draft
stweil wants to merge 14 commits into
tesseract-ocr:mainfrom
stweil:dropout
Draft

Implement dropout#4554
stweil wants to merge 14 commits into
tesseract-ocr:mainfrom
stweil:dropout

Conversation

@stweil

@stweil stweil commented May 25, 2026

Copy link
Copy Markdown
Member

This implementation for dropout was largely created with qwen3-coder and Claude Sonnet 4.6.
It is still completely untested.

stweil added 11 commits May 25, 2026 22:38
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Uses inverted dropout: during training, retained activations are scaled
by 1/(1-dropout_rate) so that no rescaling is needed at inference time.
The dropout mask is stored during Forward and reused in Backward.
The base-class randomizer_ (TRand*) is used for random number generation.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
@stweil stweil marked this pull request as draft May 25, 2026 21:36
@codacy-production

codacy-production Bot commented May 25, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 55 complexity · 10 duplication

Metric Results
Complexity 55
Duplication 10

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Comment thread src/lstm/dropout.cpp Fixed
stweil added 2 commits June 1, 2026 07:17
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants