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

textClassifierRNN.py #9

Open
followsun opened this issue Jun 22, 2017 · 2 comments
Open

textClassifierRNN.py #9

followsun opened this issue Jun 22, 2017 · 2 comments

Comments

@followsun
Copy link

File "/usr/local/lib/python3.5/dist-packages/keras/models.py", line 455, in add
output_tensor = layer(self.outputs[0])
File "/usr/local/lib/python3.5/dist-packages/keras/engine/topology.py", line 554, in call
output = self.call(inputs, **kwargs)
File "/home/l148/xuyang/workshop/EEGDNN/Motor imagery classification/seg_CSP_ConvLSTM_debug.py", line 112, in call
eij = K.tanh(K.dot(x,self.W))
File "/usr/local/lib/python3.5/dist-packages/keras/backend/tensorflow_backend.py", line 838, in dot
y_permute_dim = [y_permute_dim.pop(-2)] + y_permute_dim
IndexError: pop index out of range

@xiaoleihuang
Copy link

I got a similar error...
IndexError: pop index out of range

IndexError Traceback (most recent call last)
in ()
4 l_lstm = Bidirectional(LSTM(100, return_sequences=True))(embedded_sequences)
5 l_dense = TimeDistributed(Dense(200))(l_lstm)
----> 6 l_att = AttLayer()(l_dense)
7 sentEncoder = Model(sentence_input, l_att)
8

/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py in call(self, inputs, **kwargs)
552
553 # Actually call the layer, collecting output(s), mask(s), and shape(s).
--> 554 output = self.call(inputs, **kwargs)
555 output_mask = self.compute_mask(inputs, previous_mask)
556

in call(self, x, mask)
20
21 def call(self, x, mask=None):
---> 22 eij = K.tanh(K.dot(x, self.W))
23
24 ai = K.exp(eij)

/anaconda3/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py in dot(x, y)
836 y_shape = tuple(y_shape)
837 y_permute_dim = list(range(ndim(y)))
--> 838 y_permute_dim = [y_permute_dim.pop(-2)] + y_permute_dim
839 xt = tf.reshape(x, [-1, x_shape[-1]])
840 yt = tf.reshape(tf.transpose(y, perm=y_permute_dim), [y_shape[-2], -1])

IndexError: pop index out of range

@rucJuanLi
Copy link

I think maybe you should use Theano backend.

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