module 'tensorflow.compat.v1' has no attribute 'contrib'

from tensorflow.contrib.seq2seq import BahdanauAttention, AttentionWrapper, TrainingHelper, BasicDecoder, BeamSearchDecoder这类有替换方法吗?

可以参考https://blog.csdn.net/weixin_44069398/article/details/109490910

这种就是tf版本的问题,换版本