IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
소스 검색

Fix negative_sample_adj_mat().

master
Stanislaw Adaszewski 4 년 전
부모
커밋
7094ae87db
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. +4
    -1
      src/triacontagon/sampling.py

+ 4
- 1
src/triacontagon/sampling.py 파일 보기

@@ -135,7 +135,10 @@ def negative_sample_adj_mat(adj_mat: torch.Tensor) -> torch.Tensor:
print('neg_neighbors:', neg_neighbors)
edges_neg = torch.cat([ edges_pos[:, 0].view(-1, 1),
pos_vertices = torch.repeat_interleave(torch.arange(len(adj_mat)),
row_count)
edges_neg = torch.cat([ pos_vertices.view(-1, 1),
neg_neighbors.view(-1, 1) ], 1)
adj_mat_neg = torch.sparse_coo_tensor(indices = edges_neg.transpose(0, 1),


불러오는 중...
취소
저장