From: Francois Fleuret Date: Sat, 9 Jun 2018 18:19:03 +0000 (+0200) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=10f39c31de6f66ff238b661c86ab6a29dc4f0b7f;p=pytorch.git Update. --- diff --git a/ae_size.py b/ae_size.py index 48dc2af..25ecc4a 100755 --- a/ae_size.py +++ b/ae_size.py @@ -11,10 +11,10 @@ def minimal_input_size(w, layer_specs): if layer_specs == []: return w else: - k, s = layer_specs[0] - w = math.ceil((w - k) / s) + 1 + kernel_size, stride = layer_specs[0] + w = math.ceil((w - kernel_size) / stride) + 1 w = minimal_input_size(w, layer_specs[1:]) - return int((w - 1) * s + k) + return int((w - 1) * stride + kernel_size) ###################################################################### @@ -22,7 +22,7 @@ def minimal_input_size(w, layer_specs): if __name__ == "__main__": - layer_specs = [ (11, 5), (5, 2), (3, 2), (3, 2) ] + layer_specs = [ (11, 5), (5, 4), (3, 2), (3, 2) ] layers = [] for kernel_size, stride in layer_specs: