Verify that Caffe is configured correctly under Windows: (Note: Do not consider the build environment of Caffe, but directly use the binary files provided by the Caffe website)
Windows version source and binary library files:https://github.com/BVLC/caffe/tree/windows
#encoding: Utf-8
Import NumPy as NP;
Import Sys,os;
Note The following directory structure, according to their own actual situation can be modified
caffe_root= ' d:/env/caffe/caffe/';
Sys.path.insert (0, caffe_root + ' python ');
Import Caffe as CA; # introduce your own Caffe Python interface
Print ("######"); # Python Print 6 #
Import Matplotlib.pyplot as PLT;
Plt.plot ([1,2,3,4], [1,2,3,4]);
Plt.show (); # Draw a straight line of 45°
Ca.set_mode_gpu (); #设置使用GPU, Ca.set_mode_cpu ();
Print ("Finish Set_mode_gpu.")
# The following 5 lines verify that the interface under the Python directory can be referenced normally
Import Caffe.io as Cai;
Import Caffe.net_spec as can;
Import Caffe.classifier as CAC;
Import Caffe.draw as CAD; # This file needs to install the Pydot component
Import Caffe.coord_map as Caco;
Print ("All OK")
Dependent Installation Instructions:
Using anaconda4.2.0, or python3.5, has actually inherited worked tools such as Numpy,scipy,sklearn.
Also missing dependencies are: Pydot, but in the python3.5 platform recommended the use of Pydotplus, not Pydot, otherwise will error.
In addition, use PIP to reinstall Graphviz on the basis of installing Pydotplus.
Note: for the test here, just install Graphviz with PIP. However, in some cases (in most cases), the Graphviz tool should be installed independently. :http://www.graphviz.org/Download_windows.php
Verify that Caffe is configured correctly under Windows