New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
评估每个超边的重要性的代码 #8
Comments
其他几个类是我们尝试过的不同的特征传播的方法,应该效果比现在用的稍微差点。 |
非常感谢您的回复,还想请教您一个问题, 当调用self.layers1的时候会跳到BatchedGraphSAGEDynamicRangeMean1类的forward方法,但是我看到这个forward方法中没有用到传入进来的adj邻阶矩阵,这个怎么解释啊, 大佬, 谢谢 def forward(self, x, adj, p, t):
|
这里是用p,t 这两个参数来控制他的邻居的选取,就没用邻接矩阵 |
好的好的 谢谢
------------------ 原始邮件 ------------------
发件人: "daodaofr/hypergraph_reid" ***@***.***>;
发送时间: 2021年4月8日(星期四) 晚上8:17
***@***.***>;
抄送: "Changxia ***@***.******@***.***>;
主题: Re: [daodaofr/hypergraph_reid] 评估每个超边的重要性的代码 (#8)
这里是用p,t 这两个参数来控制他的邻居的选取,就没用邻接矩阵
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
对您的这篇论文非常感兴趣,想问您一下,您在定义layers1的时候 只用到了BatchedGraphSAGEDynamicRangeMean1 这个类,其他剩下的类您注释了BatchedGraphSAGEDynamicMean1,BatchedGraphSAGEMean1,BatchedGraphSAGEMean1Temporal,BatchedGAT_cat1 请问这几个类有用吗,还有想请问您一下 ,
for i in range(int(N/p)):
idx_start = max(0, i-t)
idx_end = min(i+t+1, int(N/p))
tmp_x = x[:,idx_startp:idx_endp,]
dis = NearestConvolution.cos_dis(tmp_x) 这个是计算特征之间的相似性
if i==0:
tk = min(dis.shape[2], self.kn)
#print(tk)
_, idx = torch.topk(dis, tk, dim=2) 是包含前K个近邻的邻居集
k_nearest = torch.stack([torch.stack([tmp_x[j, idx[j, i]] for i in range(p*(idx_end-idx_start))], dim=0) for j in range(b)], dim=0) #(b, xp, kn, d)
#print(k_nearest)
k_nearest_list.append(k_nearest[:,p(i-idx_start):p*(i-idx_start+1),])
k_nearest = torch.cat(k_nearest_list, dim=1) #(b,N, kn, d)
x_neib = k_nearest[:,:,1:,].contiguous() 我们将除节点 v i 以外的超边中的所有节点特征进行平均操作,作为超边的特征.
x_neib = x_neib.mean(dim=2)
h_k = torch.cat((self.W_x(x), self.W_neib(x_neib)), 2)
请问评估每个超边的重要性的代码 在哪里啊 谢谢您的回复
The text was updated successfully, but these errors were encountered: