How do I correctly implement a custom activity regularizer in Keras?

后端 未结 2 1492
鱼传尺愫
鱼传尺愫 2021-02-14 19:57

I am trying to implement sparse autoencoders according to Andrew Ng\'s lecture notes as shown here. It requires that a sparsity constraint be applied on an autoencoder layer by

2条回答
  •  执念已碎
    2021-02-14 20:35

    You have defined self.p = -0.9 instead of the 0.05 value that both the original poster and the lecture notes you referred to are using.

提交回复
热议问题