Auto-Encoder customized layer training My question is related with model-weights optimization during back propagation.
In this image I'm trying to represent an auto-encoder having 7 layers where 4th one is center layer.

If my understanding is correct, during back propagation outcome of jth+1 layer, will help in optimizing the weights of jth layer. If it is correct, I want to restrict the weights training of Encoder layer and want to perform my customized training.

Customized training should be like this:


Till layer 4 normal back propagation.
Layer 3 weights will get trained(optimized) using the output of 4th layer as mentioned in PINK arrow.
Layer 2 weights will get trained with the outcome of layer 5 as mentioned in YELLOW color arrow.
Layer 1 weights will get trained with the outcome of layer 6 as mentioned in BLUE color.


I want to know how I can  implement such customized trainable architecture?I'm familiar with Tensorflow, but I'm not able to figure out any solution and kind of stuck.

NOTE: Bear with my drawing.
You have to create multiple training sessions, in which you selectively freeze the layers you don't want to train. Each Sequential() model can be seen as a list of layer objects. Each of these layers have the argument trainable = True/False. You Freeze the layers you don't want to be trained classically, and proceed to

Then, using Keras Models, you connect layers that are not adjacent as you depicted in the picture. Once all layers have been trained, you transfer the weights into a news Sequential() shell to compose a final model.

It's going to be time consuming, but it's doable.