# src.build_graphs.reshape_edge_feature¶

src.build_graphs.reshape_edge_feature(F: torch.Tensor, G: torch.Tensor, H: torch.Tensor, device=None) torch.Tensor[source]

Given point-level features extracted from images, reshape it into edge feature matrix $$X$$, where features are arranged by the order of $$G$$, $$H$$.

$\mathbf{X}_{e_{ij}} = concat(\mathbf{F}_i, \mathbf{F}_j)$

where $$e_{ij}$$ means an edge connecting nodes $$i, j$$

Parameters
• F$$(b\times d \times n)$$ extracted point-level feature matrix. $$b$$: batch size. $$d$$: feature dimension. $$n$$: number of nodes.

• G$$(b\times n \times e)$$ factorized adjacency matrix, where $$\mathbf A = \mathbf G \cdot \mathbf H^\top$$. $$e$$: number of edges.

• H$$(b\times n \times e)$$ factorized adjacency matrix, where $$\mathbf A = \mathbf G \cdot \mathbf H^\top$$

• device – device. If not specified, it will be the same as the input

Returns

edge feature matrix X $$(b \times 2d \times e)$$