How to add your costume regulator function in TensorFlow?

Hi,

I would like to add a costume regularizer for my loss function in TF. Is there any straightforward way to do that?
My constraint would be:
My loss
s.t sum of each row of weight matrix = 1.

Thanks