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
a0d12623
Commit
a0d12623
authored
4 years ago
by
Frisinghelli Daniel
Browse files
Options
Downloads
Patches
Plain Diff
Changed default output path
parent
4b1765f1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pysegcnn/core/models.py
+2
-3
2 additions, 3 deletions
pysegcnn/core/models.py
with
2 additions
and
3 deletions
pysegcnn/core/models.py
+
2
−
3
View file @
a0d12623
...
...
@@ -16,7 +16,6 @@ import torch.nn as nn
# locals
from
pysegcnn.core.layers
import
(
Encoder
,
Decoder
,
Conv2dPool
,
Conv2dUnpool
,
Conv2dUpsample
,
Conv2dSame
)
from
pysegcnn.main.config
import
HERE
class
Network
(
nn
.
Module
):
...
...
@@ -33,7 +32,7 @@ class Network(nn.Module):
param
.
requires_grad
=
True
def
save
(
self
,
state_file
,
optimizer
,
bands
=
None
,
outpath
=
os
.
path
.
join
(
HERE
,
'
_models/
'
)):
outpath
=
os
.
path
.
join
(
os
.
getcwd
()
,
'
_models/
'
)):
# check if the output path exists and if not, create it
if
not
os
.
path
.
isdir
(
outpath
):
...
...
@@ -71,7 +70,7 @@ class Network(nn.Module):
return
state
def
load
(
self
,
state_file
,
optimizer
=
None
,
inpath
=
os
.
path
.
join
(
HERE
,
'
_models/
'
)):
inpath
=
os
.
path
.
join
(
os
.
getcwd
()
,
'
_models/
'
)):
# load the model state file
state
=
os
.
path
.
join
(
inpath
,
state_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