Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design2
/
2016104167
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
조현아
2020-03-31 21:39:37 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
aa191bf0d40580dbaf25690176281a65bc44ddb1
aa191bf0
1 parent
27eef6f2
reshape fc input
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
7 deletions
code/FAA2/networks/basenet.py
code/FAA2/networks/basenet.py
View file @
aa191bf
...
...
@@ -4,12 +4,6 @@ class BaseNet(nn.Module):
def
__init__
(
self
,
backbone
,
args
):
super
(
BaseNet
,
self
)
.
__init__
()
#testing
for
layer
in
backbone
.
children
():
print
(
"
\n
RESNET50 LAYERS
\n
"
)
print
(
layer
)
# Separate layers
self
.
first
=
nn
.
Sequential
(
*
list
(
backbone
.
children
())[:
1
])
self
.
after
=
nn
.
Sequential
(
*
list
(
backbone
.
children
())[
1
:
-
1
])
...
...
@@ -20,10 +14,10 @@ class BaseNet(nn.Module):
def
forward
(
self
,
x
):
f
=
self
.
first
(
x
)
x
=
self
.
after
(
f
)
x
=
x
.
reshape
(
x
.
size
(
0
),
-
1
)
x
=
self
.
fc
(
x
)
return
x
,
f
"""
print("before reshape:
\n
", x.size())
#[128, 2048, 4, 4]
...
...
Please
register
or
login
to post a comment