To try some easy things first, I want to train a 3 layer Multi-Layer Perceptron with 2 inputs and 2 outputs (2 classes). The hidden layer has 10 units. I use C++ for interfacing with Caffe.
The creation fails on the final SoftmaxWithLoss. See below for the log file:
I0811 20:14:34.592681 9256 layer_factory.hpp:77] Creating layer data_layer
I0811 20:14:34.593682 9256 net.cpp:91] Creating Layer data_layer
I0811 20:14:34.593682 9256 net.cpp:399] data_layer -> data_layer
I0811 20:14:34.594669 9256 net.cpp:399] data_layer -> target_layer
I0811 20:14:34.595681 9256 net.cpp:141] Setting up data_layer
I0811 20:14:34.595681 9256 net.cpp:148] Top shape: 1 1 1 2 (2)
I0811 20:14:34.596681 9256 net.cpp:148] Top shape: 1 (1)
I0811 20:14:34.596681 9256 net.cpp:156] Memory required for data: 24
I0811 20:14:34.596681 9256 layer_factory.hpp:77] Creating layer input_layer
I0811 20:14:34.597681 9256 net.cpp:91] Creating Layer input_layer
I0811 20:14:34.597681 9256 net.cpp:425] input_layer <- data_layer
I0811 20:14:34.598670 9256 net.cpp:399] input_layer -> input_layer
I0811 20:14:34.599671 9256 common.cpp:36] System entropy source not available, using fallback algorithm to generate seed instead.
I0811 20:14:34.600682 9256 net.cpp:141] Setting up input_layer
I0811 20:14:34.600682 9256 net.cpp:148] Top shape: 1 2 (2)
I0811 20:14:34.600682 9256 net.cpp:156] Memory required for data: 40
I0811 20:14:34.601681 9256 layer_factory.hpp:77] Creating layer input_layer_transfer
I0811 20:14:34.601681 9256 net.cpp:91] Creating Layer input_layer_transfer
I0811 20:14:34.601681 9256 net.cpp:425] input_layer_transfer <- input_layer
I0811 20:14:34.602681 9256 net.cpp:386] input_layer_transfer -> input_layer (in-place)
I0811 20:14:34.602681 9256 net.cpp:141] Setting up input_layer_transfer
I0811 20:14:34.602681 9256 net.cpp:148] Top shape: 1 2 (2)
I0811 20:14:34.602681 9256 net.cpp:156] Memory required for data: 56
I0811 20:14:34.603682 9256 layer_factory.hpp:77] Creating layer hidden_layer
I0811 20:14:34.603682 9256 net.cpp:91] Creating Layer hidden_layer
I0811 20:14:34.603682 9256 net.cpp:425] hidden_layer <- input_layer
I0811 20:14:34.604681 9256 net.cpp:399] hidden_layer -> hidden_layer
I0811 20:14:34.605670 9256 net.cpp:141] Setting up hidden_layer
I0811 20:14:34.605670 9256 net.cpp:148] Top shape: 1 10 (10)
I0811 20:14:34.605670 9256 net.cpp:156] Memory required for data: 136
I0811 20:14:34.606681 9256 layer_factory.hpp:77] Creating layer hidden_layer_transfer
I0811 20:14:34.606681 9256 net.cpp:91] Creating Layer hidden_layer_transfer
I0811 20:14:34.606681 9256 net.cpp:425] hidden_layer_transfer <- hidden_layer
I0811 20:14:34.606681 9256 net.cpp:386] hidden_layer_transfer -> hidden_layer (in-place)
I0811 20:14:34.607682 9256 net.cpp:141] Setting up hidden_layer_transfer
I0811 20:14:34.607682 9256 net.cpp:148] Top shape: 1 10 (10)
I0811 20:14:34.607682 9256 net.cpp:156] Memory required for data: 216
I0811 20:14:34.607682 9256 layer_factory.hpp:77] Creating layer output_layer
I0811 20:14:34.607682 9256 net.cpp:91] Creating Layer output_layer
I0811 20:14:34.608682 9256 net.cpp:425] output_layer <- hidden_layer
I0811 20:14:34.608682 9256 net.cpp:399] output_layer -> output_layer
I0811 20:14:34.609683 9256 net.cpp:141] Setting up output_layer
I0811 20:14:34.610682 9256 net.cpp:148] Top shape: 1 2 (2)
I0811 20:14:34.610682 9256 net.cpp:156] Memory required for data: 232
I0811 20:14:34.610682 9256 layer_factory.hpp:77] Creating layer output_layer_transfer
I0811 20:14:34.611670 9256 net.cpp:91] Creating Layer output_layer_transfer
I0811 20:14:34.611670 9256 net.cpp:425] output_layer_transfer <- output_layer
I0811 20:14:34.611670 9256 net.cpp:425] output_layer_transfer <- target_layer
I0811 20:14:34.611670 9256 net.cpp:386] output_layer_transfer -> output_layer (in-place)
I0811 20:14:34.611670 9256 layer_factory.hpp:77] Creating layer output_layer_transfer
F0811 20:14:34.612669 9256 blob.hpp:122] Check failed: axis_index < num_axes() (1 vs. 0) axis 1 out of range for 0-D Blob with shape (1)
What am I doing wrong? Help is appreciated.