Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Pytorch-Encoding
Commits
2dd88e58
Unverified
Commit
2dd88e58
authored
Jun 15, 2018
by
Hang Zhang
Committed by
GitHub
Jun 15, 2018
Browse files
fix path (#72)
parent
32e382bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
encoding/models/encnet.py
encoding/models/encnet.py
+3
-3
encoding/nn/customize.py
encoding/nn/customize.py
+0
-7
No files found.
encoding/models/encnet.py
View file @
2dd88e58
...
@@ -166,7 +166,7 @@ def get_encnet_resnet50_pcontext(pretrained=False, root='~/.encoding/models', **
...
@@ -166,7 +166,7 @@ def get_encnet_resnet50_pcontext(pretrained=False, root='~/.encoding/models', **
>>> model = get_encnet_resnet50_pcontext(pretrained=True)
>>> model = get_encnet_resnet50_pcontext(pretrained=True)
>>> print(model)
>>> print(model)
"""
"""
return
get_encnet
(
'pcontext'
,
'resnet50'
,
pretrained
,
aux
=
False
,
**
kwargs
)
return
get_encnet
(
'pcontext'
,
'resnet50'
,
pretrained
,
root
=
root
,
aux
=
False
,
**
kwargs
)
def
get_encnet_resnet101_pcontext
(
pretrained
=
False
,
root
=
'~/.encoding/models'
,
**
kwargs
):
def
get_encnet_resnet101_pcontext
(
pretrained
=
False
,
root
=
'~/.encoding/models'
,
**
kwargs
):
r
"""EncNet-PSP model from the paper `"Context Encoding for Semantic Segmentation"
r
"""EncNet-PSP model from the paper `"Context Encoding for Semantic Segmentation"
...
@@ -185,7 +185,7 @@ def get_encnet_resnet101_pcontext(pretrained=False, root='~/.encoding/models', *
...
@@ -185,7 +185,7 @@ def get_encnet_resnet101_pcontext(pretrained=False, root='~/.encoding/models', *
>>> model = get_encnet_resnet101_pcontext(pretrained=True)
>>> model = get_encnet_resnet101_pcontext(pretrained=True)
>>> print(model)
>>> print(model)
"""
"""
return
get_encnet
(
'pcontext'
,
'resnet101'
,
pretrained
,
aux
=
False
,
**
kwargs
)
return
get_encnet
(
'pcontext'
,
'resnet101'
,
pretrained
,
root
=
root
,
aux
=
False
,
**
kwargs
)
def
get_encnet_resnet50_ade
(
pretrained
=
False
,
root
=
'~/.encoding/models'
,
**
kwargs
):
def
get_encnet_resnet50_ade
(
pretrained
=
False
,
root
=
'~/.encoding/models'
,
**
kwargs
):
r
"""EncNet-PSP model from the paper `"Context Encoding for Semantic Segmentation"
r
"""EncNet-PSP model from the paper `"Context Encoding for Semantic Segmentation"
...
@@ -204,4 +204,4 @@ def get_encnet_resnet50_ade(pretrained=False, root='~/.encoding/models', **kwarg
...
@@ -204,4 +204,4 @@ def get_encnet_resnet50_ade(pretrained=False, root='~/.encoding/models', **kwarg
>>> model = get_encnet_resnet50_ade(pretrained=True)
>>> model = get_encnet_resnet50_ade(pretrained=True)
>>> print(model)
>>> print(model)
"""
"""
return
get_encnet
(
'ade20k'
,
'resnet50'
,
pretrained
,
aux
=
True
,
**
kwargs
)
return
get_encnet
(
'ade20k'
,
'resnet50'
,
pretrained
,
root
=
root
,
aux
=
True
,
**
kwargs
)
encoding/nn/customize.py
View file @
2dd88e58
...
@@ -177,13 +177,6 @@ class PyramidPooling(Module):
...
@@ -177,13 +177,6 @@ class PyramidPooling(Module):
# bilinear upsample options
# bilinear upsample options
self
.
_up_kwargs
=
up_kwargs
self
.
_up_kwargs
=
up_kwargs
def
_cat_each
(
self
,
x
,
feat1
,
feat2
,
feat3
,
feat4
):
assert
(
len
(
x
)
==
len
(
feat1
))
z
=
[]
for
i
in
range
(
len
(
x
)):
z
.
append
(
torch
.
cat
((
x
[
i
],
feat1
[
i
],
feat2
[
i
],
feat3
[
i
],
feat4
[
i
]),
1
))
return
z
def
forward
(
self
,
x
):
def
forward
(
self
,
x
):
_
,
_
,
h
,
w
=
x
.
size
()
_
,
_
,
h
,
w
=
x
.
size
()
feat1
=
F
.
upsample
(
self
.
conv1
(
self
.
pool1
(
x
)),
(
h
,
w
),
**
self
.
_up_kwargs
)
feat1
=
F
.
upsample
(
self
.
conv1
(
self
.
pool1
(
x
)),
(
h
,
w
),
**
self
.
_up_kwargs
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment