Skip to content
Permalink
Browse files

iou computation fix

  • Loading branch information...
rusty1s committed Sep 5, 2019
1 parent a6d822d commit 9fce869646408d150a583a5821f3cc69b497dfa8
Showing with 4 additions and 5 deletions.
  1. +3 −4 examples/dgcnn_segmentation.py
  2. +1 −1 examples/pointnet2_segmentation.py
@@ -39,9 +39,8 @@ def __init__(self, out_channels, k=30, aggr='max'):
self.conv3 = DynamicEdgeConv(MLP([2 * 64, 64, 64]), k, aggr)
self.lin1 = MLP([3 * 64, 1024])

self.mlp = Seq(
MLP([1024, 256]), Dropout(0.5), MLP([256, 128]), Dropout(0.5),
Lin(128, out_channels))
self.mlp = Seq(MLP([1024, 256]), Dropout(0.5), MLP([256, 128]),
Dropout(0.5), Lin(128, out_channels))

def forward(self, data):
pos, batch = data.pos, data.batch
@@ -102,7 +101,7 @@ def test(loader):
intersection = torch.cat(intersections, dim=0)
union = torch.cat(unions, dim=0)

ious = [[] for _ in range(loader.dataset.categories)]
ious = [[] for _ in range(len(loader.dataset.categories))]
for j in range(len(loader.dataset)):
i = intersection[j, loader.dataset.y_mask[category[j]]]
u = union[j, loader.dataset.y_mask[category[j]]]
@@ -124,7 +124,7 @@ def test(loader):
intersection = torch.cat(intersections, dim=0)
union = torch.cat(unions, dim=0)

ious = [[] for _ in range(loader.dataset.categories)]
ious = [[] for _ in range(len(loader.dataset.categories))]
for j in range(len(loader.dataset)):
i = intersection[j, loader.dataset.y_mask[category[j]]]
u = union[j, loader.dataset.y_mask[category[j]]]

0 comments on commit 9fce869

Please sign in to comment.
You can’t perform that action at this time.