I have a C++ code that is aimed to solve the classification problem. I included libcaffe.a,libcaffe.so to the g++ linker. The C++ code includes caffe.hpp and it uses caffe to read the model of the network from a prototxt file, perform forward() and backward() and then returns the result from the last layer of the network to the C++ code.
Everytime I give one coloured image to the network, take its output. So when I use innerproduct layers, it is able to classify data, for example I tried it on non image datasets like XOR dataset and IRIS dataset. But when I give it images as input and use convolutional layer in the model file, it gives me very strange results.
This is the network I want to use for the problem:
name: "ConvNet"
layer {
name: "inputdata"
type: "Input"
top: "data"
include {
phase: TRAIN