Sorry for the back-and-forth, but one does not need to write a custom set up function if no special care needs to be carried out. The NeuronLayer has a virtual SetUp() function that will deal with the default construction and in-place check:

https://github.com/BVLC/caffe/blob/master/src/caffe/layers/neuron_layer.cpp

So maybe simply ignore the setup function...?