Remove isolated nodes in graph using transform

I have a list of graphs in pytorch dataset format. I want to perform graph classification, but I fear that some of these graphs contain isolated nodes. How can I remove these nodes? I see there is a transform for this in Pytorch geometric, but it doesn’t say anything about how to apply it.

1 Like