amansrivastava17 / lstm-siamese-text-similarity

⚛️ It is keras based implementation of siamese architecture using lstm encoders to compute text similarity
MIT License
282 stars 88 forks source link

NameError: name 'activation_function' is not defined #1

Closed s348ankit closed 6 years ago

s348ankit commented 6 years ago

Getting Error Activation_function not Defined while trying to run below code

siamese = SiameseBiLSTM(CONFIG.embedding_dim , CONFIG.max_sequence_length, CONFIG.number_lstm_units , CONFIG.number_dense_units, CONFIG.rate_drop_lstm, CONFIG.rate_drop_dense, CONFIG.activation_function, CONFIG.validation_split_ratio)

best_model_path = siamese.train_model(sentences_pair, is_similar, embedding_meta_data, model_save_directory='./')

ghost commented 6 years ago

@s348ankit I think the problem is in model.py line 28 try changing self.activation_function = activation_function to self.activation_function = hidden_activation

amansrivastava17 commented 6 years ago

@johnkjoseph Thanks again john, fixed the issue.