summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorHugo Serrat <hu.serrat@gmail.com>2016-01-21 14:34:01 +0100
committerHugo Serrat <hu.serrat@gmail.com>2016-01-25 11:25:37 +0100
commit407050e02790b3738cc42fbbf1b51c35ee7c3021 (patch)
tree3492115881465ececa54e4e2d85cf5b814ff87d0 /python
parent813c3c9bb02a7e8b3899e7cfd6db1885228fb914 (diff)
downloadcaffeonacl-407050e02790b3738cc42fbbf1b51c35ee7c3021.tar.gz
caffeonacl-407050e02790b3738cc42fbbf1b51c35ee7c3021.tar.bz2
caffeonacl-407050e02790b3738cc42fbbf1b51c35ee7c3021.zip
Updated import to make it work with pydotplus
Diffstat (limited to 'python')
-rw-r--r--python/caffe/draw.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/python/caffe/draw.py b/python/caffe/draw.py
index f8bf5722..cfa3fc5b 100644
--- a/python/caffe/draw.py
+++ b/python/caffe/draw.py
@@ -10,7 +10,16 @@ Caffe network visualization: draw the NetParameter protobuffer.
"""
from caffe.proto import caffe_pb2
-import pydot
+
+"""
+pydot is not supported under python 3 and pydot2 doesn't work properly.
+pydotplus works nicely (pip install pydotplus)
+"""
+try:
+ # Try to load pydotplus
+ import pydotplus as pydot
+except ImportError:
+ import pydot
# Internal layer and blob styles.
LAYER_STYLE_DEFAULT = {'shape': 'record',