george730 / e-resgat Goto Github PK
View Code? Open in Web Editor NEWThe pytorch implementation of E-GraphSAGE and E-ResGAT, two solutions for intrusion detection.
The pytorch implementation of E-GraphSAGE and E-ResGAT, two solutions for intrusion detection.
Can you kindly give an "in-dept" guide for running the program?
您好,我将压缩包(包含上述的文件)解压在本地并不能运行,我运行fit_model文件会报错,会产生以下的错误:
Traceback (most recent call last):
File "F:\PycharmProjects\E-ResGAT-master\fit_model.py", line 180, in
fit(args)
File "F:\PycharmProjects\E-ResGAT-master\fit_model.py", line 40, in fit
edge_feat, label, adj, adj_lists, config = load_gat(path, device, binary)
File "F:\PycharmProjects\E-ResGAT-master\loader.py", line 56, in load_gat
edge_feat = np.load(path + "edge_feat_scaled.npy") # (n,f)
File "D:\Anaconda\envs\TF2.10gpu\lib\site-packages\numpy\lib\npyio.py", line 427, in load
fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'datasets/Darknetedge_feat_scaled.npy'
然而当我将这个文件edge_feat_scaled.npy重命名为Darknetedge_feat_scaled.npy,会进一步显示报错,datasets/DarknetDarknetedge_feat_scaled.npy
我是在win系统下运行的,numpy,torch以及scikit的版本比您要求的高。
能麻烦您指导下问题所在吗?
First, the file address identified by the code is wrong, and secondly, after the modification is completed, the corresponding file cannot be read. Please answer
Hello, I encountered the following problem when running the code. How should I solve it?
....
batch: 179 loss_train: 0.0063 acc_train: 0.9980 time: 1.9977s
batch: 180 loss_train: 0.0113 acc_train: 0.9943 time: 2.0366s
Traceback (most recent call last):
File "fit_model.py", line 180, in
fit(args)
File "fit_model.py", line 112, in fit
acc_val, loss_val, val_output = predict_(alg, model, label, loss_fn, val)
File "fit_model.py", line 142, in predict_
batch_loss = loss_fn(batch_output, label[batch_edges])
File "/home/cetc54-5/anaconda3/envs/torchIDS/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/cetc54-5/anaconda3/envs/torchIDS/lib/python3.6/site-packages/torch/nn/modules/loss.py", line 1152, in forward
label_smoothing=self.label_smoothing)
File "/home/cetc54-5/anaconda3/envs/torchIDS/lib/python3.6/site-packages/torch/nn/functional.py", line 2846, in cross_entropy
return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing)
RuntimeError: Expected floating point type for target with class probabilities, got Long
Hello, I am very sorry. Since I am not very familiar with your research direction, the source file of the edge_feat_scaled.npy file of the data set cannot be downloaded. If it is convenient, I hope you can send me any edge_feat_scaled.npy file. I would like to take a look at the format of its data so that I can expand it in my direction.
this is my e-mail: [email protected]
thank you
Dear authors,
Thank you for uploading this code. I am a beginner in anomaly detection and this has been very helpful in my research.
I have read the original article corresponding to that code. When I try to run the program, "fit_model.py", the program prompts an error, 'datasets/UNSW-NB15edge_feat_scaled.npy' could not be found, so I changed the path and the program reports the following error:
path: datasets/UNSW-NB15/
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/npyio.py", line 460, in load
return pickle.load(fid, **pickle_kwargs)
_pickle.UnpicklingError: invalid load key, 'v'.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "fit_model.py", line 180, in
fit(args)
File "fit_model.py", line 40, in fit
edge_feat, label, adj, adj_lists, config = load_gat(path, device, binary)
File "/content/gdrive/MyDrive/Colab Notebooks/E-ResGAT-master/loader.py", line 58, in load_gat
edge_feat = np.load(path + "edge_feat_scaled.npy", allow_pickle=True)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/npyio.py", line 463, in load
"Failed to interpret file %s as a pickle" % repr(file))
OSError: Failed to interpret file 'datasets/UNSW-NB15/edge_feat_scaled.npy' as a pickle
And all the dataset "edge_feat_scaled.npy" is similar. So I tried to download it using git lfs, but it's still the same after downloading. How can I solve this problem?
Thanks for any help.
Regards,
LiY
Traceback (most recent call last):
File "D:/PyCharm/Py_project/E-ResGAT-master/fit_model.py", line 189, in
File "D:/PyCharm/Py_project/E-ResGAT-master/fit_model.py", line 114, in fit
acc_val, loss_val, val_output = predict_(alg, model, label, loss_fn, val)
File "D:/PyCharm/Py_project/E-ResGAT-master/fit_model.py", line 145, in predict_
batch_loss = loss_fn(batch_output, label[batch_edges])
File "D:\Anaconda\envs\GraphSAGE\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\Anaconda\envs\GraphSAGE\lib\site-packages\torch\nn\modules\loss.py", line 948, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "D:\Anaconda\envs\GraphSAGE\lib\site-packages\torch\nn\functional.py", line 2422, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "D:\Anaconda\envs\GraphSAGE\lib\site-packages\torch\nn\functional.py", line 1591, in log_softmax
ret = input.log_softmax(dim)
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)
Hello, can you help me solve this problem?
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
Failed to fetch some objects from 'https://github.com/George730/E-ResGAT.git/info/lfs'
When I was using Git to pull 'edge_feat_scaled. npy' from your repository, there was a prompt saying 'exceeded the storage limit of lfs'. Can you provide the processing code for the dataset or share this data in other ways?
您好,我对您的研究很感兴趣,但我在复现的过程中遇到了一些问题:
fit_model.py
中的命令行参数设置存在语法问题:
p.add_argument('--binary',
help='Perform binary or muticlass task',
#action='store_true',
type=bool,
default=True)
对于bool类型参数设置,无法怎么设置binary都是True,这是很基础的语法问题。
此外,我修改后模型的多分类任务上准确率能够达到98.45%,各个类别得分正常,但是绘制的散点图没有visualization.ipynb
中的效果,我恳请您能提供一份完整的最终代码,我的邮箱为[email protected]
,谢谢。
During training, the loss value is nan. Whether the processed data contains nan values.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.