From: Francois Fleuret Date: Sat, 9 Jun 2018 12:15:53 +0000 (+0200) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=4f1a822b8d1b09bc2aed8c7fca99436db1f95620;p=pytorch.git Update. --- diff --git a/ae_size.py b/ae_size.py index 7183937..48dc2af 100755 --- a/ae_size.py +++ b/ae_size.py @@ -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)