I want to add/remove some layers in the running time. For example, I have a variable called A. If A is zero I want to have three layers and if A is not zero I want to have 5 layers in my architecture. These layers are ROI pooling layers (I don't know whether it helps or not). I know that adding and removing layers in the prototxt file is really easy but I have no idea how to do this in the running time. Even having something like
with 4-5 different phases will work. I am just familiar with TRAIN and TEST but I want something like TRAIN1, TRAIN2, TRAIN3,....
Is this feature available in Caffe and if yes, how should I use it?