Update.
authorFrancois Fleuret <francois@fleuret.org>
Sat, 9 Jun 2018 12:15:53 +0000 (14:15 +0200)
committerFrancois Fleuret <francois@fleuret.org>
Sat, 9 Jun 2018 12:15:53 +0000 (14:15 +0200)
ae_size.py

index 7183937..48dc2af 100755 (executable)
@@ -25,11 +25,11 @@ if __name__ == "__main__":
     layer_specs = [ (11, 5), (5, 2), (3, 2), (3, 2) ]
 
     layers = []
-    for l in layer_specs:
-        layers.append(nn.Conv2d(1, 1, l[0], l[1]))
+    for kernel_size, stride in layer_specs:
+        layers.append(nn.Conv2d(1, 1, kernel_size, stride))
 
-    for l in reversed(layer_specs):
-        layers.append(nn.ConvTranspose2d(1, 1, l[0], l[1]))
+    for kernel_size, stride in reversed(layer_specs):
+        layers.append(nn.ConvTranspose2d(1, 1, kernel_size, stride))
 
     m = nn.Sequential(*layers)