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
!164
Remove padding value and padding token parameters from training configuration
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Remove padding value and padding token parameters from training configuration
reomve-padding-parameter
into
main
Overview
2
Commits
2
Pipelines
0
Changes
6
Merged
Manon Blanco
requested to merge
reomve-padding-parameter
into
main
1 year ago
Overview
2
Commits
2
Pipelines
0
Changes
6
Expand
Closes
#96 (closed)
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
87b01b54
2 commits,
1 year ago
6 files
+
5
−
31
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
dan/manager/dataset.py
+
0
−
8
Options
@@ -18,7 +18,6 @@ class DatasetManager:
def
__init__
(
self
,
params
,
device
:
str
):
self
.
params
=
params
self
.
dataset_class
=
None
self
.
img_padding_value
=
params
[
"
config
"
][
"
padding_value
"
]
self
.
my_collate_function
=
None
# Whether data should be copied on GPU via https://pytorch.org/docs/stable/generated/torch.Tensor.pin_memory.html
@@ -224,13 +223,6 @@ class GenericDataset(Dataset):
if
self
.
load_in_memory
:
self
.
apply_preprocessing
(
params
[
"
config
"
][
"
preprocessings
"
])
self
.
padding_value
=
params
[
"
config
"
][
"
padding_value
"
]
if
self
.
padding_value
==
"
mean
"
:
if
self
.
mean
is
None
:
_
,
_
=
self
.
compute_std_mean
()
self
.
padding_value
=
self
.
mean
self
.
params
[
"
config
"
][
"
padding_value
"
]
=
self
.
padding_value
self
.
curriculum_config
=
None
def
__len__
(
self
):
Loading