Training conv weights with constraints

Hello,

I need to train standard 2D conv layers with mathmatical constaints on weights inside one conv layer (I’d like to drive the way the network learn the weights). What would be the best solution to do so?

Thank you for your help. Doms.