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

y_permute_dim.pop(-2) pop index out of range #27

Open
imgoodman opened this issue Aug 1, 2018 · 5 comments
Open

y_permute_dim.pop(-2) pop index out of range #27

imgoodman opened this issue Aug 1, 2018 · 5 comments

Comments

@imgoodman
Copy link

hi, this is an awesome implementation.
However, when I use AttLayer, I got an IndexError: pop index out of range.
It is found in eij = K.tanh(K.dot(x, self.W)).
Then, y_permute_dim =[y_permute_dim.pop(-2)] + y_permute_dim.
my keras is 2.1.5.
Thanks a lot

@blog4me
Copy link

blog4me commented Sep 3, 2018

I have same problems in "eij = K.tanh(K.dot(x, self.W))", it says IndexError: pop index out of range, my keras is 1.2.2, can you tell me what's going on?

@tianke0711
Copy link

same problem

1 similar comment
@tensor-flower
Copy link

same problem

@DingYunxia
Copy link

I have encountered the same problem now, how did you solve it?

@prabhatkgupta
Copy link

prabhatkgupta commented Dec 24, 2020

@imgoodman @DingYunxia You can switch Keras backend to Theano. This might be helpful to change the backend of Keras

import keras.backend as K
import importlib
import os


def change_keras_backend(backend):
    if K.backend() != backend:
        os.environ['KERAS_BACKEND'] = backend
        importlib.reload(K)


change_keras_backend("theano")

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

6 participants