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
Commits
803610d3
Commit
803610d3
authored
1 year ago
by
Manon Blanco
Committed by
Yoann Schneider
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Always use the same max_training_time
parent
158252be
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!220
Do not limit training by time
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dan/manager/training.py
+0
-9
0 additions, 9 deletions
dan/manager/training.py
dan/ocr/document/train.py
+0
-3
0 additions, 3 deletions
dan/ocr/document/train.py
docs/usage/train/parameters.md
+0
-1
0 additions, 1 deletion
docs/usage/train/parameters.md
tests/conftest.py
+0
-1
0 additions, 1 deletion
tests/conftest.py
with
0 additions
and
14 deletions
dan/manager/training.py
+
0
−
9
View file @
803610d3
...
...
@@ -33,7 +33,6 @@ class GenericTrainingManager:
self
.
params
=
params
self
.
dropout_scheduler
=
None
self
.
models
=
{}
self
.
begin_time
=
None
self
.
dataset
=
None
self
.
dataset_name
=
list
(
self
.
params
[
"
dataset_params
"
][
"
datasets
"
].
values
())[
0
]
self
.
paths
=
None
...
...
@@ -534,7 +533,6 @@ class GenericTrainingManager:
self
.
writer
=
SummaryWriter
(
self
.
paths
[
"
results
"
])
self
.
save_params
()
# init variables
self
.
begin_time
=
time
()
nb_epochs
=
self
.
params
[
"
training_params
"
][
"
max_nb_epochs
"
]
metric_names
=
self
.
params
[
"
training_params
"
][
"
train_metrics
"
]
...
...
@@ -547,13 +545,6 @@ class GenericTrainingManager:
self
.
init_curriculum
()
# perform epochs
for
num_epoch
in
range
(
self
.
latest_epoch
+
1
,
nb_epochs
):
# Check maximum training time stop condition
if
(
self
.
params
[
"
training_params
"
][
"
max_training_time
"
]
and
time
()
-
self
.
begin_time
>
self
.
params
[
"
training_params
"
][
"
max_training_time
"
]
):
break
# set models trainable
for
model_name
in
self
.
models
.
keys
():
self
.
models
[
model_name
].
train
()
...
...
This diff is collapsed.
Click to expand it.
dan/ocr/document/train.py
+
0
−
3
View file @
803610d3
...
...
@@ -160,9 +160,6 @@ def get_config():
"
training_params
"
:
{
"
output_folder
"
:
"
outputs/dan_esposalles_record
"
,
# folder name for checkpoint and results
"
max_nb_epochs
"
:
800
,
# maximum number of epochs before to stop
"
max_training_time
"
:
3600
*
24
*
1.9
,
# maximum time before to stop (in seconds)
"
load_epoch
"
:
"
last
"
,
# ["best", "last"]: last to continue training, best to evaluate
"
batch_size
"
:
2
,
# mini-batch size for training
"
use_ddp
"
:
False
,
# Use DistributedDataParallel
...
...
This diff is collapsed.
Click to expand it.
docs/usage/train/parameters.md
+
0
−
1
View file @
803610d3
...
...
@@ -145,7 +145,6 @@ For a detailed description of all augmentation transforms, see the [dedicated pa
| ------------------------------------------------------- | --------------------------------------------------------------------------- | ------------ | ------------------------------------------- |
|
`training_params.output_folder`
| Directory for checkpoint and results. |
`str`
| |
|
`training_params.max_nb_epochs`
| Maximum number of epochs before stopping training. |
`int`
|
`800`
|
|
`training_params.max_training_time`
| Maximum time (in seconds) before stopping training. |
`int`
|
`164160`
|
|
`training_params.load_epoch`
| Model to load. Should be either
`"best"`
(evaluation) or
`last`
(training). |
`str`
|
`"last"`
|
|
`training_params.batch_size`
| Mini-batch size for the training loop. |
`int`
|
`2`
|
|
`training_params.use_ddp`
| Whether to use DistributedDataParallel. |
`bool`
|
`False`
|
...
...
This diff is collapsed.
Click to expand it.
tests/conftest.py
+
0
−
1
View file @
803610d3
...
...
@@ -108,7 +108,6 @@ def training_config():
"
training_params
"
:
{
"
output_folder
"
:
"
dan_trained_model
"
,
# folder name for checkpoint and results
"
max_nb_epochs
"
:
4
,
# maximum number of epochs before to stop
"
max_training_time
"
:
1200
,
# maximum time before to stop (in seconds)
"
load_epoch
"
:
"
last
"
,
# ["best", "last"]: last to continue training, best to evaluate
"
batch_size
"
:
2
,
# mini-batch size for training
"
use_ddp
"
:
False
,
# Use DistributedDataParallel
...
...
This diff is collapsed.
Click to expand it.
Mélodie Boillet
@mboillet
mentioned in commit
45c7e802
·
1 year ago
mentioned in commit
45c7e802
mentioned in commit 45c7e802f2cec06661da87da2d44463b68ad0278
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment