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
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
Sorry for the delay in response.
Yes, you can add custom regularizers by implementing it as a subclass of tf.keras.regularizers.Regularizer
.For more details please check this official documentation of custom regularizers and I’ve also added a sample gist implementation for your reference.
Thank You.