Code Monkey home page Code Monkey logo

graphmatch_clone's People

Contributors

jacobwwh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

graphmatch_clone's Issues

Running BCB & GGNN, met exit code 139

Hi, l recently read your paper about Code Clones Detection with GNN. I appreciated that you opensource your codes and l have learned from them.
But when I ran ggnn_bcb.py without any modification, l got wrong with "Process finished with exit code 139" at GlobalAttention Step (line 3).
x = self.ggnnlayer(x, edge_index)
batch=torch.zeros(x.size(0),dtype=torch.long).to(self.device)
hg=self.pool(x,batch=batch)

It seems that one array access out of bounds when doing softmax. l don't know whether it went wrong when you did experiments.

Another question is, l found that you got edge_attr information when creating the fa-ast but didn't use it in the ggnn layer.

I hope to hear from your replies, thank you!

The bugs in models.py

1、注释了propagate方法,却调用了它
2、object has no attribute 'update_args',class GMNlayer中并没有定义这个参数,
3、我安装了torch-geometric-1.4.3,报错:RuntimeError: scatter_add() Expected a value of type 'Tensor' for argument 'src' but instead found type 'NoneType'. ,,requirement.txt中要求版本为torch-geometric==1.6.3,,但是其中torch_geometric.utils import scatter_ 据说在1.4.3版本之后就废除了??试了几个高于1.4.3版本的全都是ImportError: cannot import name 'scatter_'
4、bug解决一个又一个,不知道是不是pytorch1.8版本过高的问题,但requirement.txt中确实这么要求了
5、bug太多了,requirement.txt中依赖那么多,实际上并不需要那么多,需要的几个依赖版本也不正确,令人费解ing...
6、RuntimeError: scatter_add() Expected a value of type 'Tensor' for argument 'src' but instead found type 'NoneType'.
def match(self, edge_index_i, x_i, x_j, size_i):
return
'''def match(self, edge_index_i, x_i, x_j, size_i):
#x_j = x_j.view(-1, 1, self.out_channels)
#alpha = torch.dot(x_i, x_j)
#print(edge_index_i.size())
#print(x_i.size(),x_j.size())
alpha=torch.sum(x_ix_j, dim=1)
#alpha=torch.bmm(x_i.unsqueeze(1), x_j.unsqueeze(2))
#print(alpha.size())
size_i=x_i.size(0)
alpha = softmax(alpha, edge_index_i, size_i)
#print(alpha.size())
c = torch.ones(A, B) * 2
v = torch.randn(A, B, C)
print(c)
print(v)
print(c[:,:, None].size())
d = c[:,:, None] * v
return alpha[:,None]x_j
#return x_j
alpha.view(-1, 1, 1)
#return (x_i-x_j)
alpha.view(-1, 1, 1)'''
这里match啥也不干吗,注释掉的match中“A、B、C”也没有定义
7、我是跑不通,数据处理还可以ggnn可以跑,gmn模型bug是真的多。(也许是环境问题,如果作者看到,还望不吝解答,感谢!!)

关于阈值调整的问题

作者您好,
在论文中提到阈值是由验证集的结果进行调整,是根据验证集自动调整,还是读者自己调整呢?
如果是根据验证集自动调整,请问在代码run_bcb.py中什么位置呢?我没有找到自动调整阈值的代码。
如果是读者自己调整,那么调整的标准是什么呢?
望作者不吝赐教,非常感谢!

关于包版本的问题

作者您好,我在运行run_bcb.py时出现了问题,提示如下:
Traceback (most recent call last):
File "run_bcb.py", line 15, in
import models
File "/home/zjk/data/yhx/FA-AST/models.py", line 5, in
from torch_geometric.nn import MessagePassing,GatedGraphConv
File "/home/zjk/data/anaconda3/envs/tf2.0/lib/python3.6/site-packages/torch_geometric/init.py", line 4, in
import torch_geometric.data
File "/home/zjk/data/anaconda3/envs/tf2.0/lib/python3.6/site-packages/torch_geometric/data/init.py", line 1, in
from .data import Data
File "/home/zjk/data/anaconda3/envs/tf2.0/lib/python3.6/site-packages/torch_geometric/data/data.py", line 3, in
from torch_geometric.typing import OptTensor, NodeType, EdgeType
File "/home/zjk/data/anaconda3/envs/tf2.0/lib/python3.6/site-packages/torch_geometric/typing.py", line 4, in
from torch_sparse import SparseTensor
ModuleNotFoundError: No module named 'torch_sparse'

我猜想是我安装的包版本问题,导致torch_sparse调用出现问题,我想问一下您所用torch_geometric以及torch是多少版本呢?
期待作者的回复,非常感谢!

Package versions

Hi.
Thank you for open-sourcing your work. I'm aiming to replicate your work however, the versions of the packages that are used are not specified. I've tried different version combinations however they don't seem to work with each other. Can you please indicate the exact version for each of the packages that you have used?

对于数据处理有一点不懂的地方

作者您好,我有一点疑惑的地方,想向您请教。BigCloneBench数据集中把克隆对分成了五种克隆类型,分别为:T1, T2, ST3, MT3, WT3/T4。您在实验中是将这五种类型统一看成是克隆对和非克隆对,并用1和-1来做标签,没有按他们具体是哪种克隆类型来做区分(因为第五种克隆类型占比98%多,所以其他类型的相对来说可以忽略不计)。请问我的理解是正确的吗?请您赐教。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.