EdgeConv implementation line throws IndexError: The shape of the mask [50] at index 0 does not match the shape of the indexed tensor [4] at index 0.
Steps to reproduce the behavior:
test(loader) call.Calculation of the accuracy and IoU at the given epoch.
I'm new to the PyTorch but it seems that replacing following lines:
i = intersection[j, loader.dataset.y_mask[category[j]]]
u = union[j, loader.dataset.y_mask[category[j]]]
with
i = intersection[j, loader.dataset.y_mask[category[j], :4]]
u = union[j, loader.dataset.y_mask[category[j], :4]]
fixes crashing and give reasonable results (I'm not sure how I'm new to PyTorch). I reckon that 'Airplane': [0,1,2,3] corresponds to :4. I don't know how to generalize to make it work for list of categories.
Update: Proposed fix in "Additional context" doesn't work, it was just pure luck.
I will look into it.
This is now fixed in master. Sorry for the inconveniences!