Skip to content
Snippets Groups Projects
Commit bf7ba060 authored by mehfo331's avatar mehfo331
Browse files

evaluation of different pooling types

parent c4d16deb
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,20 @@ SPACE = "RGB"
LEARNING_RATE = 0.001 # DEAFULT IS 0.001
##################################
## POOLING METHODS ##
##################################
# Here we consistently use RGB color space and LEARNING_RATE = 0.001
#
# Max pooling: (73% goalnet)
# Avg pooling: (59% goalnet)
# Max + Avg + Max (72% goalnet)
# Avg + Max + Avg (62 % goalnet)
#
# Max pooling, 8x8,4x4,2x2: (73% goalnet)
# Max pooling, 16x16,9x9,2x2 (68% goalnet)
# Max pooling, 24x24,4x4,2x2 (65% goalnet)
##################################
## PREPARE DATA ##
##################################
......@@ -95,7 +109,7 @@ objective = nn.CrossEntropyLoss()
optimizer = torch.optim.Adam(model.parameters(), lr=LEARNING_RATE)
##################################
## TRAN NETWORK ##
## TRAIN NETWORK ##
##################################
start_epoch = 1
......
......@@ -16,15 +16,24 @@ class goalNet(nn.Module):
# Input rgb channels, output 32 channels (32 parallel computations), kernel size 5x5
nn.Conv2d(channels, 32, 5, padding=2),
# outputs 16x16xc featurmap. Stride 's' downscales by a factor 's'
nn.MaxPool2d(kernel_size=8, padding=4, stride=2),
#nn.MaxPool2d(kernel_size=24, padding=11, stride=2),
#nn.MaxPool2d(kernel_size=16, padding=7, stride=2),
nn.MaxPool2d(kernel_size=8, padding=4, stride=2),
#nn.AvgPool2d(kernel_size=8, padding=4, stride=2),
nn.ReLU())
self.seq2 = nn.Sequential(
nn.Conv2d(32, 32, 5, padding=2), nn.ReLU(),
nn.MaxPool2d(kernel_size=4, padding=2, stride=2))
#nn.MaxPool2d(kernel_size=4, padding=1, stride=2)
#nn.MaxPool2d(kernel_size=9, padding=0, stride=1)
nn.MaxPool2d(kernel_size=4, padding=2, stride=2)
#nn.AvgPool2d(kernel_size=4, padding=2, stride=2)
)
self.seq3 = nn.Sequential(nn.Conv2d(32, 64, 5, padding=2), nn.ReLU(),
nn.MaxPool2d(kernel_size=2, stride=2))
nn.MaxPool2d(kernel_size=2, stride=2)
#nn.AvgPool2d(kernel_size=2, stride=2)
)
# Fully connected since expects a 4x4xc feature map
self.fc1 = nn.Conv2d(64, 64, 4)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment