-
-
Save islem-esi/a55ed7dfcae2280f058d39573dc23aa7 to your computer and use it in GitHub Desktop.
#Change the parameters to whatever suits you | |
batch_size = 512 | |
epochs = 100 | |
labels = [0 for _ in benign_images] + [1 for _ in malicious_images] | |
model.fit(benign_images+malicious_images, labels, | |
batch_size = batch_size, | |
epochs = epochs, | |
validation_split = 0.25, | |
shuffle = True) |
benign _images and malicious images are defined in another gist (data extraction gist).
Can't find it. Link please?
Check out my medium post: https://medium.com/analytics-vidhya/cnn-based-malware-detection-python-and-tensorflow-717f8de84ee , section EXE file to Image. Using the gist in that section you are supposed to extract images for both benign and malicious exe_files. The variable in that gist is called images, but once you extract images of an exe you should either put the images in benign_images (initially an empty list) or malicious_images (also initially an empty list).
Hello Islem,
I try this code, but the benign_images and malicious_images aren't defined, and couldn't see the gist that you mention above. Can you please provide the full script?
benign_images and malicious_images aren't defined. why?