Closed BATspock closed 6 years ago
@BATspock Try taking out the last parameter in controller line number 64. It should be like this best_model_path = siamese.train_model(sentences_pair, is_similar, embedding_meta_data)
@johnkjoseph I thought the same and removed the last parameter, still got the same error
@BATspock You are right, that doesn't matter, the problem is in model.py line number 32. The first parameter there should be self like this def train_model(self, sentences_pair, is_similar, embedding_meta_data, model_save_directory='./'):
@johnkjoseph Thanks for finding the bug. Have fixed.
thanks a lot
Traceback (most recent call last): File "lstm-siamese-text-similarity/controller.py", line 64, in
best_model_path = siamese.train_model(sentences_pair, is_similar, embedding_meta_data)
File "lstm-siamese-text-similarity/model.py", line 49, in train_model
tokenizer, embedding_matrix = embedding_meta_data['tokenizer'], embedding_meta_data['embedding_matrix']
TypeError: list indices must be integers or slices, not str
I get the following error, I am unable to debug