From: Francois Fleuret Date: Fri, 30 Jun 2017 08:40:19 +0000 (+0200) Subject: Bigger DeepNet2. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=bff4d68157b2b760bd2786bc228e0bcaa2b287ee;p=pysvrt.git Bigger DeepNet2. --- diff --git a/cnn-svrt.py b/cnn-svrt.py index d0704ff..4531fb1 100755 --- a/cnn-svrt.py +++ b/cnn-svrt.py @@ -248,12 +248,13 @@ class DeepNet2(nn.Module): def __init__(self): super(DeepNet2, self).__init__() + nb_channels = 512 self.conv1 = nn.Conv2d( 1, 32, kernel_size=7, stride=4, padding=3) - self.conv2 = nn.Conv2d( 32, 256, kernel_size=5, padding=2) - self.conv3 = nn.Conv2d(256, 256, kernel_size=3, padding=1) - self.conv4 = nn.Conv2d(256, 256, kernel_size=3, padding=1) - self.conv5 = nn.Conv2d(256, 256, kernel_size=3, padding=1) - self.fc1 = nn.Linear(4096, 512) + self.conv2 = nn.Conv2d( 32, nb_channels, kernel_size=5, padding=2) + self.conv3 = nn.Conv2d(nb_channels, nb_channels, kernel_size=3, padding=1) + self.conv4 = nn.Conv2d(nb_channels, nb_channels, kernel_size=3, padding=1) + self.conv5 = nn.Conv2d(nb_channels, nb_channels, kernel_size=3, padding=1) + self.fc1 = nn.Linear(16 * nb_channels, 512) self.fc2 = nn.Linear(512, 512) self.fc3 = nn.Linear(512, 2)