Skip to content

Commit

Permalink
reverting to without FC
Browse files Browse the repository at this point in the history
  • Loading branch information
Physicist91 committed Aug 3, 2019
1 parent f672044 commit 7acda02
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,4 @@ Authors:

# Poster Session

<object data="conference_poster_6.pdf" type="application/pdf">
<embed src="conference_poster_6.pdf">
<p>This browser does not support PDFs. Please download the PDF to view it: <a href="http://yoursite.com/the.pdf">Download PDF</a>.</p>
</embed>
</object>
![poster](poster.png)
22 changes: 11 additions & 11 deletions dv/DFL.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,26 +124,26 @@ def __init__(self, k = 10, nclass = 196):
# G-Stream
self.conv5 = conv5
self.cls5 = nn.Sequential(
#nn.Conv2d(2048, nclass, kernel_size=1, stride = 1, padding = 0),
nn.Conv2d(2048, 1024, kernel_size=1, stride = 1, padding = 0),
#nn.BatchNorm2d(nclass),
nn.BatchNorm2d(1024),
nn.Conv2d(2048, nclass, kernel_size=1, stride = 1, padding = 0),
#nn.Conv2d(2048, 1024, kernel_size=1, stride = 1, padding = 0),
nn.BatchNorm2d(nclass),
#nn.BatchNorm2d(1024),
nn.ReLU(True),
nn.AdaptiveAvgPool2d((1,1)),
# Add FC units
nn.Dropout(),
#nn.Dropout(),
)
self.fc5 = nn.Linear(1024, nclass)
#self.fc5 = nn.Linear(1024, nclass)

# P-Stream
self.conv6 = conv6
self.pool6 = pool6
self.cls6 = nn.Sequential(
#nn.Conv2d(k * nclass, nclass, kernel_size = 1, stride = 1, padding = 0),
nn.Conv2d(k * nclass, k * nclass, kernel_size = 1, stride = 1, padding = 0),
nn.Conv2d(k * nclass, nclass, kernel_size = 1, stride = 1, padding = 0),
#nn.Conv2d(k * nclass, k * nclass, kernel_size = 1, stride = 1, padding = 0),
nn.AdaptiveAvgPool2d((1,1)),
)
self.fc6 = nn.Linear(k * nclass, nclass)
#self.fc6 = nn.Linear(k * nclass, nclass)

# Side-branch
self.cross_channel_pool = nn.AvgPool1d(kernel_size = k, stride = k, padding = 0)
Expand All @@ -158,15 +158,15 @@ def forward(self, x):
x_g = self.conv5(inter4)
out1 = self.cls5(x_g)
out1 = out1.view(batchsize, -1)
out1 = self.fc5(out1)
#out1 = self.fc5(out1)

# P-stream ,indices are for visualization
x_p = self.conv6(inter4)
x_p, indices = self.pool6(x_p)
inter6 = x_p
out2 = self.cls6(x_p)
out2 = out2.view(batchsize, -1)
out2 = self.fc6(out2)
#out2 = self.fc6(out2)

# Side-branch, no FC layers are required here
inter6 = inter6.view(batchsize, -1, self.k * self.nclass)
Expand Down

0 comments on commit 7acda02

Please sign in to comment.