alex-berard / seq2seq

Attention-based sequence to sequence learning
Apache License 2.0
388 stars 122 forks source link

Problem with decoding on test set with the latest seq2seq (tensorflow 1.2 version) #6

Closed pingtt closed 7 years ago

pingtt commented 7 years ago

Hi, I've just tried the latest seq2seq with tensorflow 1.2. The bleu score for my test set decoding suddenly become 1++ (even though during training with development set, bleu score is around 20+) using the latest version. Previously I used the seq2seq with tensorflow 1.0 without any problem, test set is around 20+. Did I miss something?

By the way, thanks for the great work!

alex-berard commented 7 years ago

Hello, If you're using an old model, it's probable that some variable names have changed, and the system is unable to load them.

You can use the '-v' parameter when decoding, and it will display the names of each variable, and the variables it was able to load from your checkpoint.

From there, and by looking at the 'log.txt' file from your old model, you can see which variables are missing. Then, you can add rules to the 'variable_mapping' and 'reverse_mapping' lists in 'translation_model.py', to map from old variable names to new ones, or inversely.

In addition, some parameters may have changed in the configuration files (e.g. max_output_len/max_input_len -> max_len). You should look into config/default.yaml and compare with your model's config file to see if some names and/or default values have changed.

Best

pingtt commented 7 years ago

Thanks. It's working now! This latest version runs faster than the previous 1.0. Thanks again!