title: Extract CNN features using Caffe and train using SVM
body: <p>I want to extract features using caffe and train those features using SVM. I have gone through this link: <a href="http://caffe.berkeleyvision.org/gathered/examples/feature_extraction.html" rel="nofollow">http://caffe.berkeleyvision.org/gathered/examples/feature_extraction.html</a>. This links provides how we can extract features using caffenet. But I want to use Lenet architecture here. I am unable to change this line of command for Lenet:</p>
  
  <pre><code>  ./build/tools/extract_features.bin models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel examples/_temp/imagenet_val.prototxt fc7 examples/_temp/features 10 leveldb
  </code></pre>
  
  <p>And also, after extracting the features, how to train these features using SVM? I want to use python for this. For eg: If I get features from this code: </p>
  
  <pre><code>features = net.blobs['pool2'].data.copy()
  </code></pre>
  
  <p>Then, how can I train these features using SVM by defining my own classes?</p>