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
998d3053
Commit
998d3053
authored
1 year ago
by
Manon Blanco
Committed by
Manon Blanco
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Always use the same max_training_time
parent
158252be
No related branches found
No related tags found
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
+1
-5
1 addition, 5 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
1 addition
and
10 deletions
dan/manager/training.py
+
1
−
5
View file @
998d3053
...
...
@@ -548,11 +548,7 @@ class GenericTrainingManager:
# 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
"
]
):
if
time
()
-
self
.
begin_time
>
3600
*
24
*
1.9
:
break
# set models trainable
for
model_name
in
self
.
models
.
keys
():
...
...
This diff is collapsed.
Click to expand it.
dan/ocr/document/train.py
+
0
−
3
View file @
998d3053
...
...
@@ -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 @
998d3053
...
...
@@ -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 @
998d3053
...
...
@@ -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.
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