Giter Club home page Giter Club logo

e-resgat's People

Contributors

george730 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

e-resgat's Issues

Can't run this program

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

运行出错

您好,我将压缩包(包含上述的文件)解压在本地并不能运行,我运行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的版本比您要求的高。
能麻烦您指导下问题所在吗?

Failed to interpret file 'datasets/UNSW-NB15/edge_feat_scaled.npy' as a pickle

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

QQ图片20220522100645

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

Expected floating point type for target with class probabilities, got Long

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

无法绘制正确的散点图,请求发布完整的代码

您好,我对您的研究很感兴趣,但我在复现的过程中遇到了一些问题:
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],谢谢。
image

Can't Run

Can you kindly give an "in-dept" guide for running the program?

loss value is nan

During training, the loss value is nan. Whether the processed data contains nan values.

IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

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?

I want a dataset

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

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.