I am implementing a Seq2Seq model in Tensorflow. I have pre-trained weights for the model, when I used Greedydecoder, I got a normal score like 14.12, but when I used BeamsearchDecoder(beamsize=3 or 5, the same results), I only got a 0.02 score, which seems like the weights have not load. That is confused me all day, could some one give me a clue.
After this codes, I used dynamic_decoder to deco. But I got a very low score in Beamsearchdecoder, but not bad in Greedydecoder, could some one tell me why.
And also, I found another question, the return of FinalBeamSearchDecoderOutput is: (predicted_ids, beam_search_decoder_output), but I print the predicted_ids and the beam_search_decoder_output.predicted_ids, I found the two are different.
I am implementing a Seq2Seq model in Tensorflow. I have pre-trained weights for the model, when I used Greedydecoder, I got a normal score like 14.12, but when I used BeamsearchDecoder(beamsize=3 or 5, the same results), I only got a 0.02 score, which seems like the weights have not load. That is confused me all day, could some one give me a clue.
Here is my relative code, first is the Attention:
Here is Greedydecoder, which seems right when I load my pre-trained weights, I use a variable "beam_size" to switch if use the Greedy or Beamsearch:
Next is the Beamsearchdecoder:
After this codes, I used dynamic_decoder to deco. But I got a very low score in Beamsearchdecoder, but not bad in Greedydecoder, could some one tell me why.
And also, I found another question, the return of FinalBeamSearchDecoderOutput is: (predicted_ids, beam_search_decoder_output), but I print the predicted_ids and the beam_search_decoder_output.predicted_ids, I found the two are different.