Multi-layer Regularization

Hello,
I’m relatively new to Tensorflow, and I’m trying to build my own regularizer that works by taking in weights of some dense layers, flattening and concatenating them, and inputting that into another small MLP, which gives me the regularization penalty. Does anyone know how to implement this kind of multi-layer regularization in tensorflow?

Hi @Raghav_Kapoor

Welcome to the TensorFlow Forum!

You can achieve this by following the Tensorflow API doc of developing_new_regularizers and can customize and construct the regularizer function as per your requirement and further use it into the model.