Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttLayer has no attribute init #4

Open
andreaskoelsch opened this issue Apr 6, 2017 · 2 comments
Open

AttLayer has no attribute init #4

andreaskoelsch opened this issue Apr 6, 2017 · 2 comments

Comments

@andreaskoelsch
Copy link

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'

@richliao
Copy link
Owner

richliao commented Apr 7, 2017

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

@vikas95
Copy link

vikas95 commented Jul 2, 2017

@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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants