virtual_attrs = torch.full((to_add, ), 0.1).unsqueeze(-1)
edge_attr = torch.cat((g.edge_attr, virtual_attrs), dim=0)
The shape of edge_attr is (x, 3), and (y, 1) for virtual_attrs, which leads to the error.
I solve this by :"virtual_attrs = torch.full((to_add, edge_attr.shape[1]), 0.1)", but I want to know whether this is reasonable.
And why does this error happens.
virtual_attrs = torch.full((to_add, ), 0.1).unsqueeze(-1)
edge_attr = torch.cat((g.edge_attr, virtual_attrs), dim=0)
The shape of edge_attr is (x, 3), and (y, 1) for virtual_attrs, which leads to the error.
I solve this by :"virtual_attrs = torch.full((to_add, edge_attr.shape[1]), 0.1)", but I want to know whether this is reasonable.
And why does this error happens.