-
Notifications
You must be signed in to change notification settings - Fork 81
/
run.sh
19 lines (19 loc) · 1.22 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# First we must run the program with the -setupMode flag
# The program should be run with this flag ONLY ONCE for each dataset
# This reads the dataset, splits it into training and testing-sets
# and saves the dataset metadata to a file
#
th DetectMalware_CNN.lua -useCUDA -gpuid 1 -programLen 8192 -nConvFilters 64 -nEpochs 75 -nSamplingEpochs 5 -nConvLayers 1 -seed 1 -learningRate 1e-3 -nEmbeddingDims 8 -kernelLength 8 -saveModel -saveFileName model_tmp -dataDir ./dataset/ -metaDataFile ./config/metaData_small_test.th7 -maxSequenceLength 8192 -setupMode
#
#
# Below is the code to train a network
# This uses the metadata file above so that we can reproduce our results
#
th DetectMalware_CNN.lua -useCUDA -gpuid 1 -programLen 8192 -nConvFilters 64 -nEpochs 75 -nSamplingEpochs 5 -nConvLayers 1 -seed 1 -learningRate 1e-3 -nEmbeddingDims 8 -kernelLength 8 -saveModel -saveFileName model_tmp -dataDir ./dataset/ -metaDataFile ./config/metaData_small_test.th7 -maxSequenceLength 8192
#
#
# Below is the code to test a pre-trained network
# This should only be run ONCE after setting hyper-parameters using the validation-set
#
th testWithPreTrainedNetwork.lua -useCUDA -dataDir ./dataset -modelPath ./trainedNets/model_tmp.th7