title: Drawing network in Caffe causes pydot to throw End of Line errors
body: <p>So I just pulled the latest revision of Caffe from the master branch, and went through all the initialization steps. As a quick test, I was trying to run the <code>python/draw_net.py</code> script provided, in order to visualize the MNIST Autoencoder example network. 
  On executing the following command:</p>
  
  <p><code>./python/draw_net.py examples/mnist/mnist_autoencoder.prototxt trial_viz.png
  </code></p>
  
  <p>Pydot complained, and threw the following error:</p>
  
  <pre><code>Drawing net to trial_viz.png
  Traceback (most recent call last):
    File "./python/draw_net.py", line 44, in &lt;module&gt;
      main()
    File "./python/draw_net.py", line 40, in main
      caffe.draw.draw_net_to_file(net, args.output_image_file, args.rankdir)
    File "/home/username/3rdparty/caffe/python/caffe/draw.py", line 165, in draw_net_to_file
      fid.write(draw_net(caffe_net, rankdir, ext))
    File "/home/username/3rdparty/caffe/python/caffe/draw.py", line 156, in draw_net
      return get_pydot_graph(caffe_net, rankdir).create(format=ext)
    File "/usr/lib/pymodules/python2.7/pydot.py", line 1796, in create
      status, stderr_output) )
  pydot.InvocationException: Program terminated with status: 1. stderr follows: Warning: /tmp/tmpjqPQBC:5: string ran past end of line
  Error: /tmp/tmpjqPQBC:6: syntax error near line 6
  context:  &gt;&gt;&gt; ( &lt;&lt;&lt; Sigmoid)" [shape=record, style=filled, fillcolor="#6495ED"];
  Warning: /tmp/tmpjqPQBC:6: ambiguous "6495ED" splits into two names: "6495" and "ED"
  Warning: /tmp/tmpjqPQBC:6: string ran past end of line
  Warning: /tmp/tmpjqPQBC:9: string ran past end of line
  Warning: /tmp/tmpjqPQBC:10: string ran past end of line
  Warning: /tmp/tmpjqPQBC:12: string ran past end of line
  Warning: /tmp/tmpjqPQBC:13: ambiguous "6495ED" splits into two names: "6495" and "ED"
  Warning: /tmp/tmpjqPQBC:13: string ran past end of line
  Warning: /tmp/tmpjqPQBC:14: string ran past end of line
  Warning: /tmp/tmpjqPQBC:15: string ran past end of line
  Warning: /tmp/tmpjqPQBC:17: string ran past end of line
  Warning: /tmp/tmpjqPQBC:18: ambiguous "6495ED" splits into two names: "6495" and "ED"
  </code></pre>
  
  <p>I see many more <code>Warning</code> messages like the ones shown above, and my error log was getting too big, so I didn't post the entire log.
  <a href="https://stackoverflow.com/questions/24442094/pydot-not-playing-well-with-line-breaks">This post</a>, seems to be seeing the same error as me, so I tried to replicate their solution, and changed all the strings in the <code>get_pydot_graph()</code> method in <code>draw.py</code> to raw strings. But that didn't seem to work. </p>
  
  <p>Any suggestions on how I can sort this issue?</p>
  
  <p>Thanks!! :)</p>