title: use trained keras cnn to generate feature maps
body: <p>I trained up a very vanilla CNN using keras/theano that does a pretty good job of detecting whether a small (32X32) portion of an image contains a (relatively simple) object of type A or B (or neither).  The output is an array of three numbers [prob(neither class), prob(A), prob(B)].  Now, I want to take a big image (512X680, methinks) and sweep across the image, running the trained model on each 32X32 sub-image to generate a feature map that's 480X648, at each point consisting of a 3-vector of the aforementioned probabilities.  Basically, I want to use my whole trained CNN as a (nonlinear) filter with three-dimensional output.  At the moment, I am cutting each 32X32 out of the image one at a time and running the model on it, then dropping the resulting 3-vectors in a big 3X480X648 array.  However, this approach is very slow.  Is there a faster/better way to do this?</p>