From f99e2c83638c960d158c17270c072876834df9a9 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Mon, 24 Feb 2020 16:29:46 +0100 Subject: [PATCH] Update. --- dummy.net | 2 +- sizer.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/dummy.net b/dummy.net index 31e3a1e..244696d 100644 --- a/dummy.net +++ b/dummy.net @@ -5,4 +5,4 @@ nn.Conv2d(32, 32, 3, padding = 1) nn.MaxPool2d(2) nn.Conv2d(32, 64, 3, padding = 1) nn.MaxPool2d(5) -nn.Conv2d(64, 128, (3, 4)) +nn.Conv2d(64, 64, (3, 4)) diff --git a/sizer.py b/sizer.py index 52620e8..cc0a19e 100755 --- a/sizer.py +++ b/sizer.py @@ -1,5 +1,10 @@ #!/usr/bin/env python +# Any copyright is dedicated to the Public Domain. +# https://creativecommons.org/publicdomain/zero/1.0/ + +# Written by Francois Fleuret + import os, stat, sys import time import torch @@ -7,6 +12,21 @@ from torch import nn t = 0 +if len(sys.argv) < 2: + print(sys.argv[0] + ''' + +For example: + +(17, 3, 60, 80) +nn.Conv2d(3, 32, 3, padding = 1) +nn.MaxPool2d(2) +nn.Conv2d(32, 32, 3, padding = 1) +nn.MaxPool2d(2) +nn.Conv2d(32, 64, 3, padding = 1) +nn.MaxPool2d(5) +nn.Conv2d(64, 64, (3, 4))''') + exit(1) + while True: pt = t t = os.stat(sys.argv[1])[stat.ST_MTIME] -- 2.20.1