From c2529410fd09306876b8ceac6fb075c7792350a6 Mon Sep 17 00:00:00 2001 From: Kolten Pearson Date: Sat, 3 Jun 2017 16:58:22 -0600 Subject: [PATCH] fixed bugs with padding --- dump_filters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dump_filters.py b/dump_filters.py index 2221168..740d348 100644 --- a/dump_filters.py +++ b/dump_filters.py @@ -51,10 +51,11 @@ def create_graph(): def make_padding(padding_name, conv_shape): + padding_name = (padding_name.decode("utf-8")) if padding_name == "VALID": return [0, 0] elif padding_name == "SAME": - return [int(math.ceil(conv_shape[0]/2)), int(math.ceil(conv_shape[1]/2))] + return [int(math.floor(conv_shape[0]/2)), int(math.floor(conv_shape[1]/2))] else: sys.exit('Invalid padding name '+padding_name)