simon
simon

Reputation: 2831

In Keras what is the difference between weight_regularizer and activity_ regularizer

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

Answers (1)

Sergii Gryshkevych
Sergii Gryshkevych

Reputation: 4159

The difference is that activity_regularizer is applied to the output from an intermediate layer, it penalizes large layer output.

Upvotes: 6

Related Questions