You have 406 images? or 406 classes?
The num_output refers to how many classes you are trying to classify.
So if you are trying to make a cat vs dog classifier, you would have 406 images approximately evenly split into 2 classes, cat and dog. Then num_output is 2.
(in practice you might split into 3 classes, cat, dog and anything else, and then num_output=3)
You need to take the original GoogLeNet train_val.prototxt (you can find it in your Caffe source code) and go to these 3 layers:
loss1/classifier
loss2/classifier
loss3/classifier
For each of them, you need to
1. rename the layer so that Caffe won't try to copy the weights from the original GoogLeNet into it
2. update num_output to the number of classes you're trying to recognise.