Skip to content

Question about the logic of processing parent prediction in visualization_parts() #2

@SevenLJY

Description

@SevenLJY

Hi,

Thanks for the amazing work.

I'm trying to understand the output processing code in the demo and get confused about how you get the final parent node for each part. Specifically, I didn't get the code at lines 443-447 in util.py as shown below.

# update parent labels
for p_i, each_parent in enumerate(parent_pred):
    if each_parent>0:
        if each_parent-1 in list(new_order):
            parent_pred[p_i] = list(new_order).index(each_parent-1)+1

Can you explain a bit of the intuition behind how you update the parent labels? Many thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions