I'm trying to use the MINST Caffe example via the C++ API, but I'm having a bit of trouble working out how to restructure the network prototxt file I'll deploy after training. I've trained and tested the model with the original file (lenet_train_test.prototxt), but when I want to deploy it and make predictions like in the C++ and OpenCV example, I realise I have to modify the input section to make it similar to the deploy.prototxt file they have.
Can I replace the information in the training and testing layers of the lenet_train_test.prototxt with this section of the deploy.prototxt file?
name: "CaffeNet"
input: "data"
input_shape {
dim: 10
dim: 3
dim: 227
dim: 227
}
The images I'll be passing for classification to the network will be grayscale and 24*24 pixels, and I'll also want to scale it like was done with the MINST dataset, so could I modify the section to this?
name: "CaffeNet"
input: "data"
input_shape {
dim: 10
dim: 1
dim: 24
dim: 24
}
transform_param {
scale: 0.00390625
}
I'm not entirely sure what the "dim: 10" is coming from though.