WangYueFt / dgcnn

MIT License
1.62k stars 420 forks source link

tensorflow/provider.py #62

Closed NayeeC closed 2 years ago

NayeeC commented 4 years ago

In provider.py have a get_model function, it look like this:

def get_model(point_cloud, is_training, bn_decay=None): """ ConvNet baseline, input is BxNx9 gray image """ batch_size = point_cloud.get_shape()[0].value num_point = point_cloud.get_shape()[1].value input_image = tf.expand_dims(point_cloud, -1)

k = 20

adj = tf_util.pairwise_distance(point_cloud[:, :, 6:])
nn_idx = tf_util.knn(adj, k=k)  # (batch, num_points, k)
edge_feature = tf_util.get_edge_feature(input_image, nn_idx=nn_idx, k=k)

out1 = tf_util.conv2d(edge_feature, 64, [1, 1],
                      padding='VALID', stride=[1,1],
                      bn=True, is_training=is_training, weight_decay=weight_decay,
                      scope='adj_conv1', bn_decay=bn_decay, is_dist=True)

(just a part of this function) in the out1, you can see there is a parameter named weight_decay, whose value is weight_decay, however I cant find this value anywhere, so I just set it as 0. Would you please help me about this question?

LeopoldACC commented 4 years ago

the default value of weight_decay is set 0 in conv2d as shown below def conv2d(inputs, num_output_channels, kernel_size, scope, stride=[1, 1], padding='SAME', use_xavier=True, stddev=1e-3, weight_decay=0.0, activation_fn=tf.nn.relu, bn=False, bn_decay=None, is_training=None, is_dist=False):