summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2017-02-16 16:30:19 -0800
committerGitHub <noreply@github.com>2017-02-16 16:30:19 -0800
commit4b653486a13e507188482758bbbfa8d71eb87343 (patch)
treecbd4b087e8dd2d8f05d0e479c3f41bacef6a6d82
parent8a7a61a142d14886ddf279459fc5239f66d48a62 (diff)
parentdb6cf0a728cad63c93b345f2203f3ad1f5d5c2f4 (diff)
downloadcaffeonacl-4b653486a13e507188482758bbbfa8d71eb87343.tar.gz
caffeonacl-4b653486a13e507188482758bbbfa8d71eb87343.tar.bz2
caffeonacl-4b653486a13e507188482758bbbfa8d71eb87343.zip
Merge pull request #5010 from ngaloppo/fix_drawnet
[fix] pycaffe net draw needs default pooling values
-rw-r--r--python/caffe/draw.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/caffe/draw.py b/python/caffe/draw.py
index 9eecf6d7..e4fd7aac 100644
--- a/python/caffe/draw.py
+++ b/python/caffe/draw.py
@@ -104,11 +104,11 @@ def get_layer_label(layer, rankdir):
pooling_types_dict[layer.pooling_param.pool],
layer.type,
separator,
- layer.pooling_param.kernel_size,
+ layer.pooling_param.kernel_size[0] if len(layer.pooling_param.kernel_size._values) else 1,
separator,
- layer.pooling_param.stride,
+ layer.pooling_param.stride[0] if len(layer.pooling_param.stride._values) else 1,
separator,
- layer.pooling_param.pad)
+ layer.pooling_param.pad[0] if len(layer.pooling_param.pad._values) else 0)
else:
node_label = '"%s%s(%s)"' % (layer.name, separator, layer.type)
return node_label