Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Climax
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
Climax
Commits
d03acd09
Commit
d03acd09
authored
3 years ago
by
Frisinghelli Daniel
Browse files
Options
Downloads
Patches
Plain Diff
Adjust model filenames.
parent
78456299
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
climax/main/downscale_bootstrap.py
+6
-6
6 additions, 6 deletions
climax/main/downscale_bootstrap.py
with
6 additions
and
6 deletions
climax/main/downscale_bootstrap.py
+
6
−
6
View file @
d03acd09
...
...
@@ -158,26 +158,26 @@ if __name__ == '__main__':
for
i
in
range
(
BOOTSTRAP
):
# add suffix for n'th bootstrap
state_file
=
state_file
.
parent
.
joinpath
(
state_file
.
name
.
replace
(
model
=
state_file
.
parent
.
joinpath
(
state_file
.
name
.
replace
(
state_file
.
suffix
,
'
_{}.pt
'
.
format
(
i
+
1
)))
# check if target dataset already exists
target_ds
=
target
.
joinpath
(
state_file
.
name
.
replace
(
state_file
.
suffix
,
'
.nc
'
))
target_ds
=
target
.
joinpath
(
model
.
name
.
replace
(
model
.
suffix
,
'
.nc
'
))
if
target_ds
.
exists
()
and
not
OVERWRITE
:
LogConfig
.
init_log
(
'
{} already exists.
'
.
format
(
target_ds
))
continue
# load pretrained model
if
state_file
.
exists
()
and
not
OVERWRITE
:
if
model
.
exists
()
and
not
OVERWRITE
:
# load pretrained network
net
,
_
=
Network
.
load_pretrained_model
(
state_file
,
NET
)
net
,
_
=
Network
.
load_pretrained_model
(
model
,
NET
)
else
:
# initialize network and optimizer
LogConfig
.
init_log
(
'
Initializing network and optimizer.
'
)
# instanciate network
net
=
NET
(
state_file
,
inputs
,
outputs
,
filters
=
FILTERS
)
net
=
NET
(
model
,
inputs
,
outputs
,
filters
=
FILTERS
)
# initialize optimizer
optimizer
=
OPTIM
(
net
.
parameters
(),
**
OPTIM_PARAMS
)
...
...
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