'LSTM' object has no attribute 'kernel' in keras 2.2.0

528 views
Skip to first unread message

sarem...@googlemail.com

unread,
Jun 14, 2018, 1:16:14 AM6/14/18
to Keras-users
Hi,

I was using this the code for Concrete Dropout from https://github.com/yaringal/ConcreteDropout/blob/master/concrete-dropout.ipynb
and it worked fine for me on keras 2.0.4. However, after updating to 2.2.0, I am now getting the above error when I am using
any sort of recurrent layer (LSTM in this case, but RNNs as well, haven't tried GRU yet, but it is working fine with Dense() layers):

Changing the code to use the 2.2.0 equivalent to the 2.0.4 LSTM/Recurrent kernel should probably fix it, but I have trouble finding it -
would really appreciate if someone tells me how to adjust the ConcreteDropout part to work with all layers again.

Thanks a lot and kind regards,
Sarem
Auto Generated Inline Image 1

sarem...@googlemail.com

unread,
Jun 14, 2018, 1:45:22 AM6/14/18
to Keras-users
Got it working now by using 

weight = self.layer.cell.kernel

Can anyone confirm that this is the correct kernel object?
Reply all
Reply to author
Forward
0 new messages