Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DAN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Automatic Text Recognition
DAN
Merge requests
!131
Remove teacher_forcing_error_rate
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Remove teacher_forcing_error_rate
remove-teacher-forcing-error-rate
into
main
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Thibault Lavigne
requested to merge
remove-teacher-forcing-error-rate
into
main
1 year ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
Closes
#65 (closed)
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
d3baf700
1 commit,
1 year ago
1 file
+
1
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
dan/manager/training.py
+
1
−
8
Options
@@ -1087,14 +1087,7 @@ class Manager(OCRManager):
reduced_size
=
[
s
[:
2
]
for
s
in
batch_data
[
"
imgs_reduced_shape
"
]]
y_len
=
batch_data
[
"
labels_len
"
]
# add errors in teacher forcing
if
(
"
teacher_forcing_error_rate
"
in
self
.
params
[
"
training_params
"
]
and
self
.
params
[
"
training_params
"
][
"
teacher_forcing_error_rate
"
]
is
not
None
):
error_rate
=
self
.
params
[
"
training_params
"
][
"
teacher_forcing_error_rate
"
]
simulated_y_pred
,
y_len
=
self
.
add_label_noise
(
y
,
y_len
,
error_rate
)
elif
"
label_noise_scheduler
"
in
self
.
params
[
"
training_params
"
]:
if
"
label_noise_scheduler
"
in
self
.
params
[
"
training_params
"
]:
error_rate
=
(
self
.
params
[
"
training_params
"
][
"
label_noise_scheduler
"
][
"
min_error_rate
"
Loading