Closed legoc1986 closed 3 years ago
In short words, x
is by default None during construction of torch_geometric.data.Data
:
https://github.com/rusty1s/pytorch_geometric/blob/90c2126895b21313a23657f4e845acc782d11bf5/torch_geometric/data/data.py#L72
and later torch_geometric takes a set of torch_geometric.data.Data
and construct torch_geometric.data.Batch
, which adds the batch
attribute.
https://github.com/rusty1s/pytorch_geometric/blob/master/torch_geometric/data/batch.py
Since x
represent node features, which is expected to be empty before feature extraction, in this line
https://github.com/xiangruhuang/HumanCorresViaLearn2Sync/blob/25615f50c47f4cebe2aaccb7826aef94cffdc72f/src/human_corres/modules/pointnet2.py#L61
you should expect None from data.x
.
@xiangruhuang Thanks a lot. I set the data.x=None in the pointnet2.
Hi @xiangruhuang , According to the datasets like faust.py (https://github.com/xiangruhuang/HumanCorresViaLearn2Sync/blob/main/src/human_corres/datasets/faust.py#L90), it returns data.pos, data.y and data.ori_pos.
While the model of PointNet2, https://github.com/xiangruhuang/HumanCorresViaLearn2Sync/blob/main/src/human_corres/modules/pointnet2.py#L61, the forward function takes (data.x, data.pos, data.batch), could you help on this? Thanks Best regards Xiaofang Wang