tensor2tensor icon indicating copy to clipboard operation
tensor2tensor copied to clipboard

ensemble is very slow...

Open annisamansa opened this issue 8 years ago • 1 comments

tensorflow question actually.. I implemented ensemble about transformer model in t2t.. the way is typical, like decode_single_step -> making some choice -> decode_single_step ...... But it's so slow cuz you need to in and out and in and out the session.. and it's much slower than just using _beam_decode() to decode the whole sentence... i used theano to implement ensemble before, it's totally acceptable.. i wonder why it's so slow in tensorflow.. and what can i do to accelerate it? thanks a lot...

annisamansa avatar Mar 30 '18 09:03 annisamansa

In my opinion ,the ensemble decoding speed depends on the the number of fusion models and the t2t version you choose. The new version with fast_decode can speed up the decoding process. By the way, tensorflow inplementation requires the largest graph size smaller than 2GB which I met in my experiment.

libeineu avatar Jul 11 '18 03:07 libeineu