解决 TensorFlow 2.x 中的 “AttributeError: module ‘tensorflow‘ has no attribute ‘placeholder‘“ 错误-CSDN博客
将原先的
indices = tf.placeholder(tf.int32, shape=(batch_size, None, 2), name="indices")
is_training = tf.placeholder(tf.bool, name='is_training')
pts_fts = tf.placeholder(tf.float32, shape=(batch_size, max_point_num, setting.data_dim), name='points')
改为:
tf.compat.v1.disable_eager_execution()
indices = tf.compat.v1.placeholder(tf.int32, shape=(batch_size, None, 2), name="indices")
is_training = tf.compat.v1.placeholder(tf.bool, name='is_training')
pts_fts = tf.compat.v1.placeholder(tf.float32, shape=(batch_size, max_point_num, setting.data_dim), name='points')