Edges missing from A
There is a bug in Graph which results in missing edges in A when using the "distance" and "spatial" partition strategies.
Steps to reproduce
Here's an example of getting the "centrifugal" adjacency under the "spatial" partition strategy for "openpose" joints.
>>> graph = Graph(layout='openpose', strategy='spatial')
>>> print((graph.A[2] > 0).astype(np.int))
[[0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0]
[1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]]
You'll notice that there are no edges for nodes which are far from the "center" node (nodes 4, 7, 9, 10, 12, 13, 16, and 17).
Cause
I believe that the root of the problem is that hop_dis is calculated with a limited number of max hops: https://github.com/open-mmlab/mmskeleton/blob/82bf68a5d3a6b530721ea407086a65d97cc71ff1/mmskeleton/ops/st_gcn/graph.py#L34-L36
This limited number of max hops causes many "inf" entries in hop_dis, which results in code like the following not working as expected: https://github.com/open-mmlab/mmskeleton/blob/82bf68a5d3a6b530721ea407086a65d97cc71ff1/mmskeleton/ops/st_gcn/graph.py#L116-L124
A potential fix is to always call get_hop_distance with a high enough value of max_hop to include all paths:
self.hop_dis = get_hop_distance(self.num_node,
self.edge,
max_hop=self.num_node)