Recently, I worked with kernel constraints in Keras to restrict gradients during training. For my use case (regression), I found the NonNeg constraint pretty useful.
From my understanding, the NonNeg-class restricts the gradients to be only positive (presumably using the absolute gradients). Therefore, I wonder if there are any differences between activating a layer using linear activation layers.Dense(1, activation = "linear", kernel_constraint = "non_neg") vs. ReLU activation layers.Dense(1, activation = "relu", kernel_constraint = "non_neg") when adding the NonNeg-constraint. Do you have some insights?