torch_geometric.nn.conv.PointNetConv
- class PointNetConv(local_nn: Optional[Callable] = None, global_nn: Optional[Callable] = None, add_self_loops: bool = True, **kwargs)[source]
Bases:
MessagePassing来自“PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation”和“PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space”论文的PointNet集合层。
\[\mathbf{x}^{\prime}_i = \gamma_{\mathbf{\Theta}} \left( \max_{j \in \mathcal{N}(i) \cup \{ i \}} h_{\mathbf{\Theta}} ( \mathbf{x}_j, \mathbf{p}_j - \mathbf{p}_i) \right),\]其中 \(\gamma_{\mathbf{\Theta}}\) 和 \(h_{\mathbf{\Theta}}\) 表示神经网络,即 MLPs,并且 \(\mathbf{P} \in \mathbb{R}^{N \times D}\) 定义了每个点的位置。
- Parameters:
local_nn (torch.nn.Module, optional) – 一个神经网络 \(h_{\mathbf{\Theta}}\),它将节点特征
x和 相对空间坐标pos_j - pos_i从形状[-1, in_channels + num_dimensions]映射到形状[-1, out_channels],例如,由torch.nn.Sequential定义。(默认值:None)global_nn (torch.nn.Module, optional) – 一个神经网络 \(\gamma_{\mathbf{\Theta}}\) 将形状为
[-1, out_channels]的聚合节点特征映射到形状[-1, final_out_channels],例如,由torch.nn.Sequential定义。(默认值: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))\) 如果是二分图, 边索引 \((2, |\mathcal{E}|)\)
output: node features \((|\mathcal{V}|, F_{out})\) or \((|\mathcal{V}_t|, F_{out})\) if bipartite