In the latest tf 2.0 update tensorflow removed the contrib module from the framework. Thought they have compensated for most of the function from it in tf.compat.v1 but I couldn't find the substitute for the functions such as tf.contrib.seq2seq.BasicDecoder, tf.contrib.seq2seq.dynamic_decode, tf.contrib.seq2seq.GreedyEmbeddingHelper and tf.contrib.seq2seq.TrainingHelper. How to use these functions in my model?
Check out TensorFlow-Addons:
https://github.com/tensorflow/addons ,
https://www.tensorflow.org/addons/api_docs/python/tfa/seq2seq?hl=en
the functions you are looking for are all there.
pip install tensorflow-addons
Then:
import tensorflow as tf
import tensorflow_addons as tfa
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.