Reputation: 2831
I understand regularization normally adds k*w^2 to the loss to penalize large weights. But in Keras there are two regularizer parameters - weight_regularizer and activity_ regularizer. What is the difference?
Upvotes: 4
Views: 3368
Reputation: 4159
The difference is that activity_regularizer
is applied to the output from an intermediate layer, it penalizes large layer output.
Upvotes: 6