Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PySegCNN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
earth_observation_public
PySegCNN
Commits
539880fa
Commit
539880fa
authored
4 years ago
by
Frisinghelli Daniel
Browse files
Options
Downloads
Patches
Plain Diff
Skip already processed folds.
parent
2e435fd6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pysegcnn/main/train_source.py
+10
-0
10 additions, 0 deletions
pysegcnn/main/train_source.py
with
10 additions
and
0 deletions
pysegcnn/main/train_source.py
+
10
−
0
View file @
539880fa
...
@@ -30,6 +30,7 @@ License
...
@@ -30,6 +30,7 @@ License
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# builtins
# builtins
import
logging
from
logging.config
import
dictConfig
from
logging.config
import
dictConfig
# locals
# locals
...
@@ -39,6 +40,9 @@ from pysegcnn.core.trainer import (DatasetConfig, SplitConfig, ModelConfig,
...
@@ -39,6 +40,9 @@ from pysegcnn.core.trainer import (DatasetConfig, SplitConfig, ModelConfig,
from
pysegcnn.main.train_config
import
ds_config
,
ds_split_config
,
model_config
from
pysegcnn.main.train_config
import
ds_config
,
ds_split_config
,
model_config
from
pysegcnn.core.logging
import
log_conf
from
pysegcnn.core.logging
import
log_conf
# module level logger
LOGGER
=
logging
.
getLogger
(
__name__
)
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
@@ -64,6 +68,12 @@ if __name__ == '__main__':
...
@@ -64,6 +68,12 @@ if __name__ == '__main__':
# (vii) instanciate the model state file for the current fold
# (vii) instanciate the model state file for the current fold
state_file
=
net_sc
.
init_state
(
src_dc
,
src_sc
,
net_mc
,
fold
=
fold
)
state_file
=
net_sc
.
init_state
(
src_dc
,
src_sc
,
net_mc
,
fold
=
fold
)
# check if the state file already exists
if
state_file
.
exists
()
and
not
net_mc
.
checkpoint
:
LOGGER
.
info
(
'
Fold already exists: {}
'
.
format
(
state_file
))
LOGGER
.
info
(
'
Moving to next fold ...
'
)
continue
# (viii) instanciate logging configuration
# (viii) instanciate logging configuration
net_lc
=
LogConfig
(
state_file
)
net_lc
=
LogConfig
(
state_file
)
dictConfig
(
log_conf
(
net_lc
.
log_file
))
dictConfig
(
log_conf
(
net_lc
.
log_file
))
...
...
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