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

后端 未结 2 2172
你的背包
你的背包 2021-02-14 20:15

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.

提交回复
热议问题