textClassifier icon indicating copy to clipboard operation
textClassifier copied to clipboard

AttLayer has no attribute init

Open andreaskoelsch opened this issue 9 years ago • 2 comments

Hi, When I am using your code, this is the error that I get:

    l_att = AttLayer()(l_dense)
  File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 491, in __call__
    self.build(input_shapes[0])
  File "text_ClassifierHATT.py", line 222, in build
    self.W = self.init((input_shape[-1],))
AttributeError: 'AttLayer' object has no attribute 'init'

andreaskoelsch avatar Apr 06 '17 23:04 andreaskoelsch

Keras layer interface probably has changed. You need to adapt to the new protocol. Check Keras topology.py file.

richliao avatar Apr 07 '17 13:04 richliao

@koelscha - could you solve this problem?? Even I am getting the same error. @richliao - Can you help us by pointing out at a specific function (or line number) in Keras topology.py file. https://github.com/fchollet/keras/blob/master/keras/engine/topology.py

Thanks guys..

vikas95 avatar Jul 02 '17 16:07 vikas95