Open MinuteswithMetrics opened 5 years ago
Hi @MinuteswithMetrics ,
Thank you for running my code. Are you running the code as it is? Did you run it on SICK data set and get the same error?
I am running the jupyter notebook as is. I even tried using my own dataset and I get the same error.
The dataset I will be using is similar to BIOSSES.csv.
Can you post all the version of the libraries you are using?
Below are the libraries that I am using.
flair
scipy==1.1.0
matplotlib==2.2.3
pandas==0.23.4
Keras==2.2.4
Keras_Preprocessing==1.0.9
requests==2.21.1
numpy==1.15.1
tensorflow==1.13.0
gensim==3.8.0
scikit_learn==0.19.2
I notice your code is similar to Biomedical Semantic Similarity Estimation
, but I can't pinpoint why the code is failing at that particular spot.
I met the same problem,so how to resolve it.
@BruceLee66 I'm in the process of figuring out.
sims, trained_model, topic = run_experiment(sick_train_normlized, sick_test_normalized, ['sent_1', 'sent_2'], "sim", benchmarks[i])
In here I provide 'sent_1', 'sent_2'. These are the column names in my dataset, what are the column names in your dataset and do you provide them correctly?
Okay, I think I may figure it out. But I have to test it first and will take a few days.
@TharinduDR My column names are the same.
Can you explain datasets = [train_df, test_df]
?
I notice you have it here:
def run_bigru_benchmark(train_df, test_df, sent_cols, sim_col, validation_portion=0.1, n_hidden=100, embedding_dim=300,
batch_size=64, n_epoch=500, optimizer=None, save_weights=None, load_weights=None,
max_seq_length=None, model=None):
datasets = [train_df, test_df]
But I didn't see train_df and test_df
anywhere else.
I hope even the similarity column name is same.
I make an array of datasets from train_df and test_df so that the operations in prepare_embeddings can be applied easily to both train_df and test_df.
I did not change anything about the train data or the test data,all of them were provided by the link in your code.
The format of the data is like @TharinduDR and how did you fix it? @MinuteswithMetrics
@BruceLee66 I didn't fix it. I'm still trying to figure out why we are getting the error.
I am trying to reproduce the error, Will let you know soon
@TharinduDR Thank you
@TharinduDR How replacing datasets = [train_df, test_df]
with concat([df_train, df_test])
@TharinduDR Is this correct? In your embedding processing, on line 11 you have questions_cols = question_cols
. But in def run_lstm_benchmark
you have question_cols=sent_cols
.
Shouldn't it be question_cols=['sent_1', 'sent_2']
?
def run_bigru_benchmark(train_df, test_df, sent_cols, sim_col, validation_portion=0.1, n_hidden=100, embedding_dim=300,
batch_size=64, n_epoch=500, optimizer=None, save_weights=None, load_weights=None,
max_seq_length=None, model=None):
datasets = [train_df, test_df]
embeddings = prepare_embeddings(datasets=datasets, question_cols=sent_cols, model=model)
I found the 'embeddings' is a tuple, but was passed on the Embedding Layer.
@xie233,
Did you get the code to run?
Thank you for sharing your code. I tried to see if I can achieve the same results but I ran into
AttributeError: 'tuple' object has no attribute 'shape'
error. I also tried using the Quora training set and ran into the same error as well.I was also wondering if this
datasets = [train_df, test_df]
on line 15 inbigru_manhattan.py
. Should it besick_train
andsick_test
?