课程
课程汇总
作业
代码注释(tensorflow版本)
github
EdgeConv修改
增加余弦距离
def get_edge_feature(point_cloud, nn_idx, k=20):
"""Construct edge feature for each point
Args:
point_cloud: (batch_size, num_points, 1, num_dims)
nn_idx: (batch_size, num_points, k)
k: int
Returns:
edge features: (batch_size, num_points, k, num_dims)
"""
og_batch_size = point_cloud.get_shape().as_list()[0]
point_cloud = tf.squeeze(point_cloud) # B*N*num_dims
if og_batch_size == 1:
point_cloud = tf.expand_dims(point_cloud