ccc2876 / malgan Goto Github PK
View Code? Open in Web Editor NEWMy replication of the paper "Generating Adversarial Malware Examples for Black-Box Attacks Based on GAN"
My replication of the paper "Generating Adversarial Malware Examples for Black-Box Attacks Based on GAN"
I clone your code,but it doesn't work.The error prompt that model has been sended to cuda,but data was not. And net have error in layers connect, 256 doesn't match 512
# generate batch of benign
idb = np.random.randint(0, xmal_batch.shape[0], batch_size)
should be
# generate batch of benign
idb = np.random.randint(0, x_train_ben.shape[0], batch_size)
I may be wrong, Please clarify. Thanks
0.9872029250457038 0.9854014598540146
Traceback (most recent call last):
File "code/MalGAN.py", line 417, in <module>
main()
File "code/MalGAN.py", line 375, in main
train(200, blackbox, generator, d_optimizer, g_optimizer, TRAIN_TPR, TEST_TPR, sigmoid, isFirst=True)
File "code/MalGAN.py", line 247, in train
fake_mal_data, ymal_batch)
File "code/MalGAN.py", line 139, in train_discriminator
prediction_real = discriminator(real_data)
File "/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
result = self.forward(*input, **kwargs)
File "code/MalGAN.py", line 60, in forward
x = self.out(x)
File "/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
result = self.forward(*input, **kwargs)
File "/lib/python3.7/site-packages/torch/nn/modules/container.py", line 92, in forward
input = module(input)
File "//python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
result = self.forward(*input, **kwargs)
File "/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 87, in forward
return F.linear(input, self.weight, self.bias)
File "/lib/python3.7/site-packages/torch/nn/functional.py", line 1370, in linear
ret = torch.addmm(bias, input, weight.t())
RuntimeError: size mismatch, m1: [64 x 512], m2: [256 x 1] at /pytorch/aten/src/TH/generic/THTensorMath.cpp:197
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.