在 Keras 中,weight_regularizer 和 activity_regularizer 之间有什么区别

In Keras what is the difference between weight_regularizer and activity_ regularizer

我了解正则化通常会将 k*w^2 添加到损失中以惩罚大权重。但是在 Keras 中有两个正则化器参数——weight_regularizer 和 activity_regularizer。有什么区别?

区别在于activity_regularizer应用于中间层的输出,它惩罚大层输出。