Skip to content

DGCNN implementation #18

@EryiXie

Description

@EryiXie

Hi, I compared your implementation with the original DGCNN and I find out that, in yours the function "get_graph_feature" is only used before the first convolution operation, instead of using it before every convolution layer.

I am wondering if there is some reason behind this difference.

RGM/models/dgcnn.py

Lines 154 to 179 in b0e2f74

def forward(self, xyz):
xyz = xyz.permute(0, 2, 1).contiguous() # (B, 3, N)
batch_size, num_dims, num_points = xyz.size()
x = get_graph_feature(xyz, self.features, self.neighboursnum) # (B, C, N, n)
x = F.relu(self.bn1(self.conv1(x)))
x1 = x.max(dim=-1, keepdim=True)[0]
x = F.relu(self.bn2(self.conv2(x)))
x2 = x.max(dim=-1, keepdim=True)[0]
x = F.relu(self.bn3(self.conv3(x)))
x3 = x.max(dim=-1, keepdim=True)[0]
x = F.relu(self.bn4(self.conv4(x)))
x4 = x.max(dim=-1, keepdim=True)[0]
x = torch.cat((x1, x2, x3, x4), dim=1)
x_node = x.squeeze(-1)
x_edge = F.relu(self.bn5(self.conv5(x))).view(batch_size, -1, num_points)
# if torch.sum(torch.isnan(x_edge)):
# print('discover nan value')
return x_node, x_edge

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions