- ๐ Hi, Iโm @Scorks
scorks / gan_drl_ids Goto Github PK
View Code? Open in Web Editor NEWIntrusion Detection System using Deep Reinforcement Learning and Generative Adversarial Networks
Intrusion Detection System using Deep Reinforcement Learning and Generative Adversarial Networks
Hi,
Thanks for sharing this cpde. I tried your code and i'm facing this error:
AxisError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_21096\874485016.py in
7 #print(train_n['Class'].value_counts(dropna=False))
8 #print(train_n.head(10))
----> 9 models = train_with_data(train_new)
~\AppData\Local\Temp\ipykernel_21096\1681573222.py in train_with_data(train)
17
18 #Training the GAN model chosen: Vanilla GAN, CGAN, DCGAN, etc.
---> 19 synthesizer = model(gan_args)
20 synthesizer.train(train, train_args)
21 models = {'GAN': ['GAN', False, synthesizer.generator]}
~\AppData\Local\Temp\ipykernel_21096\1858274551.py in init(self, gan_args)
23
24 self.discriminator = Discriminator(self.batch_size).
---> 25 build_model(input_shape=self.data_dim, dim=layers_dim, num_classes= self.num_classes)
26
27 optimizer = Adam(lr, 0.5)
~\AppData\Local\Temp\ipykernel_21096\1858274551.py in build_model(self, input_shape, dim, num_classes)
183 label = Input(shape= (1,), dtype = 'int32')
184
--> 185 label_embedding = Embedding(input_dim = num_classes, output_dim = np.prod(input_shape, self.batch_size), input_length = 1)(label)
186 label_embedding = Flatten()(label_embedding)
187 label_embedding = Reshape((input_shape, self.batch_size))(label_embedding)
<array_function internals> in prod(*args, **kwargs)
~.conda\envs\myenv\lib\site-packages\numpy\core\fromnumeric.py in prod(a, axis, dtype, out, keepdims, initial, where)
2909 """
2910 return _wrapreduction(a, np.multiply, 'prod', axis, dtype, out,
-> 2911 keepdims=keepdims, initial=initial, where=where)
2912
2913
~.conda\envs\myenv\lib\site-packages\numpy\core\fromnumeric.py in _wrapreduction(obj, ufunc, method, axis, dtype, out, **kwargs)
88 return reduction(axis=axis, out=out, **passkwargs)
89
---> 90 return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
91
92
AxisError: axis 64 is out of bounds for array of dimension 0
May you advise please ?
I kindly request your assistance in obtaining the "NSL-KDD Features - Sheet1.csv" file. It would greatly facilitate my understanding and application of the code in the repository. If possible, could you please provide me with the mentioned file or guide me on where I can access it?
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.