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

BiLSTM.py Getting an Error in Train_POS.py #42

Open
ankur220693 opened this issue Feb 25, 2019 · 1 comment
Open

BiLSTM.py Getting an Error in Train_POS.py #42

ankur220693 opened this issue Feb 25, 2019 · 1 comment

Comments

@ankur220693
Copy link

[root@sks bilstm_mai]# python3.6 Train_POS.py
Using TensorFlow backend.
Using existent pickle file: pkl/unidep_pos_cc.mai.300.vec.pkl
--- unidep_pos ---
2298 train sentences
1 dev sentences
1 test sentences
Traceback (most recent call last):
File "Train_POS.py", line 70, in
model.fit(epochs=25)
File "/home/Ankur_JRF/Backup_Ubuntu/LSTM/bilstm_mai/neuralnets/BiLSTM.py", line 381, in fit
self.buildModel()
File "/home/Ankur_JRF/Backup_Ubuntu/LSTM/bilstm_mai/neuralnets/BiLSTM.py", line 105, in buildModel
tokens = Embedding(input_dim=self.embeddings.shape[0], output_dim=self.embeddings.shape[1], weights=[self.embeddings], trainable=False, name='word_embeddings')(tokens_input)
IndexError: tuple index out of range

@ankur220693 ankur220693 changed the title Bilstm.py error Bilstm.py Getting an Error in Train_POS.py Feb 25, 2019
@ankur220693 ankur220693 changed the title Bilstm.py Getting an Error in Train_POS.py BiLSTM.py Getting an Error in Train_POS.py Feb 25, 2019
@cqdrdair
Copy link

When reading the embedding file, Note the last line of processing.
If the last line is '', may get this error

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

2 participants