torch_geometric.nn.conv.PPFConv
- class PPFConv(local_nn: Optional[Callable] = None, global_nn: Optional[Callable] = None, add_self_loops: bool = True, **kwargs)[source]
Bases:
MessagePassing来自“PPFNet: Global Context Aware Local Features for Robust 3D Point Matching”论文的PPFNet操作符。
\[\mathbf{x}^{\prime}_i = \gamma_{\mathbf{\Theta}} \left( \max_{j \in \mathcal{N}(i) \cup \{ i \}} h_{\mathbf{\Theta}} ( \mathbf{x}_j, \| \mathbf{d_{j,i}} \|, \angle(\mathbf{n}_i, \mathbf{d_{j,i}}), \angle(\mathbf{n}_j, \mathbf{d_{j,i}}), \angle(\mathbf{n}_i, \mathbf{n}_j) \right)\]其中 \(\gamma_{\mathbf{\Theta}}\) 和 \(h_{\mathbf{\Theta}}\) 表示神经网络,即 MLPs,它们接收节点特征和
torch_geometric.transforms.PointPairFeatures。- Parameters:
local_nn (torch.nn.Module, optional) – A neural network \(h_{\mathbf{\Theta}}\) that maps node features
xand relative spatial coordinatespos_j - pos_iof shape[-1, in_channels + num_dimensions]to shape[-1, out_channels], e.g., defined bytorch.nn.Sequential. (default:None)global_nn (torch.nn.Module, optional) – A neural network \(\gamma_{\mathbf{\Theta}}\) that maps aggregated node features of shape
[-1, out_channels]to shape[-1, final_out_channels], e.g., defined bytorch.nn.Sequential. (default:None)add_self_loops (bool, optional) – If set to
False, will not add self-loops to the input graph. (default:True)**kwargs (optional) – Additional arguments of
torch_geometric.nn.conv.MessagePassing.
- Shapes:
输入: 节点特征 \((|\mathcal{V}|, F_{in})\) 或 \(((|\mathcal{V_s}|, F_{s}), (|\mathcal{V_t}|, F_{t}))\) 如果是二分图, 位置 \((|\mathcal{V}|, 3)\) 或 \(((|\mathcal{V_s}|, 3), (|\mathcal{V_t}|, 3))\) 如果是二分图, 点法线 \((|\mathcal{V}, 3)\) 或 \(((|\mathcal{V_s}|, 3), (|\mathcal{V_t}|, 3))\) 如果是二分图, 边索引 \((2, |\mathcal{E}|)\)
output: node features \((|\mathcal{V}|, F_{out})\) or \((|\mathcal{V}_t|, F_{out})\) if bipartite