1. AttributeError: module ‘tensorflow‘ has no attribute ‘sparse_tensor_dense_matmul‘
Tensorflow2 已经没有 tf.sparse_tensor_dense_matmul(),变成tf.sparse.sparse_dense_matmul(st,dt)
tf.sparse.sparse_dense_matmul(A_fold_hat[f], ego_embeddings)
2. AttributeError: module ‘tensorflow‘ has no attribute ‘placeholder‘
对于该报错来说,由于Tensorflow2 已经不支持该方法,那么可以取巧的方式来调用该方法
import tensorflow.compat.v1 as tf1
tf1.disable_v2_behavior()