Spaces:
Sleeping
Sleeping
Update models/models/utils/encoder_decoder.py
Browse files
models/models/utils/encoder_decoder.py
CHANGED
@@ -511,7 +511,7 @@ def adj_from_skeleton(num_pts, skeleton, mask, device='cuda'):
|
|
511 |
edges = torch.tensor(skeleton[b])
|
512 |
adj = torch.zeros(num_pts, num_pts, device=device)
|
513 |
adj[edges[:, 0], edges[:, 1]] = 1
|
514 |
-
adj_mx = torch.
|
515 |
trans_adj_mx = torch.transpose(adj_mx, 1, 2)
|
516 |
cond = (trans_adj_mx > adj_mx).float()
|
517 |
adj = adj_mx + trans_adj_mx * cond - adj_mx * cond
|
|
|
511 |
edges = torch.tensor(skeleton[b])
|
512 |
adj = torch.zeros(num_pts, num_pts, device=device)
|
513 |
adj[edges[:, 0], edges[:, 1]] = 1
|
514 |
+
adj_mx = torch.cat((adj_mx, adj.unsqueeze(0)), dim=0)
|
515 |
trans_adj_mx = torch.transpose(adj_mx, 1, 2)
|
516 |
cond = (trans_adj_mx > adj_mx).float()
|
517 |
adj = adj_mx + trans_adj_mx * cond - adj_mx * cond
|