Commit 5bad1c18 authored by LongChan's avatar LongChan
Browse files

added ga and hyper-parameter

parent d5d06703
......@@ -35,16 +35,16 @@ The instruction below will do a sweep run on each of the following networks:
To obtain individual optimization result for a specific network and a specfic number of partition, please refer to the section below.
To get optimization result with
1. CMA-es
1. Covariance Matrix Adaptation Evolution Strategy (CMA-es)
```bash
# cd optimization_algo/scripts
# ./sweep_nets_cma.sh
```
1. GA
1. Genetic Algorithm (GA)
```bash
# cd optimization_algo/scripts
# ./sweep_nets_cma.sh
# ./sweep_nets_ga.sh
```
1. CMA
......
......@@ -3,6 +3,7 @@ import csv
import sys
import random
import operator
import path_constant as pc
from multiprocessing import Pool
from os import cpu_count
......@@ -69,7 +70,7 @@ class ga_approach(object):
def parse_topology_file(self):
layers = []
with open(self.topology_file, 'r') as f:
with open(pc.TOPOLOGIES_PATH+self.topology_file, 'r') as f:
next(f)
for line in f:
elems = line.strip().split(',')
......@@ -82,7 +83,7 @@ class ga_approach(object):
def parse_data_set_file(self, path_to_data_csv):
first = True
target_idx = 2
with open(path_to_data_csv, 'r') as f:
with open(pc.DATA_SOURCE_PATH+path_to_data_csv, 'r') as f:
for line in f:
elems = line.strip().split(',')
# #print(elems)
......@@ -296,7 +297,7 @@ class ga_approach(object):
# print("Throughtput Ratio:", (1/max_latency)/(1/full_latency[full_max_idx]))
# print("Latency increase:", (max_latency*self.k)/full_latency[full_max_idx])
with open('ga.csv', 'a') as csvFile:
with open(pc.RESULT_CSV_PATH+'ga.csv', 'a') as csvFile:
writer = csv.writer(csvFile, delimiter=',', lineterminator="\n")
writer.writerow([self.target_col, self.gen,self.k,self.topology_file, 1,
(1/max_latency), max_latency*self.k,
......
import sys
import time
import csv
import path_constant as pc
from hyperopt import fmin, tpe, hp, STATUS_OK, Trials, pyll
class hyper_parameter(object):
......@@ -42,7 +44,7 @@ class hyper_parameter(object):
def parse_topology_file(self):
layers = []
with open(self.topology_file, 'r') as f:
with open(pc.TOPOLOGIES_PATH+self.topology_file, 'r') as f:
next(f)
for line in f:
elems = line.strip().split(',')
......@@ -63,7 +65,7 @@ class hyper_parameter(object):
def parse_data_set_file(self, path_to_data_csv):
first = True
target_idx = 2
with open(path_to_data_csv, 'r') as f:
with open(pc.DATA_SOURCE_PATH+path_to_data_csv, 'r') as f:
for line in f:
elems = line.strip().split(',')
# #print(elems)
......@@ -164,7 +166,7 @@ class hyper_parameter(object):
full_latency, full_max_idx = self.find_max_latency([self.layers], [self.max_res_unit]*len(self.layers))
feasable = 0
max_latency = 100000000
with open('hyperopt.csv', 'a') as csvFile:
with open(pc.RESULT_CSV_PATH+'hyperopt.csv', 'a') as csvFile:
for stuff in self.trials.trials:
self.i = stuff.get("tid")
self.end = stuff.get("result").get("eval_time")
......
......@@ -5699,3 +5699,33 @@ Cycles,7,13,squeezenet.csv,1,4.730749398012139e-06,2747979,1.0305166907635819e-0
Cycles,8,13,squeezenet.csv,1,4.730749398012139e-06,2747979,1.0305166907635819e-06,970387,4.590657716088805,2.831838225367817,"[['Conv1'], ['Fire2_sq1'], ['Fire2_ex1'], ['Fire2_ex3'], ['Fire3_sq1'], ['Fire3_ex1'], ['Fire3_ex3'], ['Fire4_sq1'], ['Fire4_ex1'], ['Fire4_ex3'], ['Fire5_sq1', 'Fire5_ex1'], ['Fire5_ex3', 'Fire6_sq1', 'Fire6_ex1', 'Fire6_ex3', 'Fire7_sq1', 'Fire7_ex1', 'Fire7_ex3', 'Fire8_sq1'], ['Fire8_ex1', 'Fire8_ex3', 'Fire9_sq1', 'Fire9_ex1', 'Fire9_ex3', 'Conv10']]","[383, 3, 2, 16, 4, 2, 16, 8, 8, 64, 6, 192, 256]",16.906407117843628,0,0,100,1,100,960,ga
Cycles,9,13,squeezenet.csv,1,4.730749398012139e-06,2747979,1.0305166907635819e-06,970387,4.590657716088805,2.831838225367817,"[['Conv1'], ['Fire2_sq1'], ['Fire2_ex1'], ['Fire2_ex3'], ['Fire3_sq1'], ['Fire3_ex1'], ['Fire3_ex3'], ['Fire4_sq1'], ['Fire4_ex1'], ['Fire4_ex3'], ['Fire5_sq1', 'Fire5_ex1'], ['Fire5_ex3', 'Fire6_sq1', 'Fire6_ex1', 'Fire6_ex3', 'Fire7_sq1', 'Fire7_ex1', 'Fire7_ex3', 'Fire8_sq1'], ['Fire8_ex1', 'Fire8_ex3', 'Fire9_sq1', 'Fire9_ex1', 'Fire9_ex3', 'Conv10']]","[383, 3, 2, 16, 4, 2, 16, 8, 8, 64, 6, 192, 256]",20.357659339904785,0,0,100,1,100,960,ga
Cycles,10,13,squeezenet.csv,1,4.730749398012139e-06,2747979,1.0305166907635819e-06,970387,4.590657716088805,2.831838225367817,"[['Conv1'], ['Fire2_sq1'], ['Fire2_ex1'], ['Fire2_ex3'], ['Fire3_sq1'], ['Fire3_ex1'], ['Fire3_ex3'], ['Fire4_sq1'], ['Fire4_ex1'], ['Fire4_ex3'], ['Fire5_sq1', 'Fire5_ex1'], ['Fire5_ex3', 'Fire6_sq1', 'Fire6_ex1', 'Fire6_ex3', 'Fire7_sq1', 'Fire7_ex1', 'Fire7_ex3', 'Fire8_sq1'], ['Fire8_ex1', 'Fire8_ex3', 'Fire9_sq1', 'Fire9_ex1', 'Fire9_ex3', 'Conv10']]","[383, 3, 2, 16, 4, 2, 16, 8, 8, 64, 6, 192, 256]",24.13702940940857,0,0,100,1,100,960,ga
DRAM_cycle,0,3,FasterRCNN.csv,1,3.708387259464731e-07,8089770,1.7852976100042365e-07,5601307,2.0771815515150616,1.4442647046483972,"[['Conv1', 'CB2a_1'], ['CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1'], ['IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[6, 442, 512]",0.5851094722747803,0,0,100,1,100,960,ga
DRAM_cycle,1,3,FasterRCNN.csv,1,4.027585740252135e-07,7448631,1.7852976100042365e-07,5601307,2.2559744199974463,1.3298023122103466,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3'], ['CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2'], ['IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[16, 256, 688]",1.4240820407867432,0,0,100,1,100,960,ga
DRAM_cycle,2,3,FasterRCNN.csv,1,4.027585740252135e-07,7448631,1.7852976100042365e-07,5601307,2.2559744199974463,1.3298023122103466,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3'], ['CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2'], ['IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[16, 256, 688]",2.5671000480651855,0,0,100,1,100,960,ga
DRAM_cycle,3,3,FasterRCNN.csv,1,4.027585740252135e-07,7448631,1.7852976100042365e-07,5601307,2.2559744199974463,1.3298023122103466,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3'], ['CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2'], ['IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[16, 256, 688]",3.9174299240112305,0,0,100,1,100,960,ga
DRAM_cycle,4,3,FasterRCNN.csv,1,4.027585740252135e-07,7448631,1.7852976100042365e-07,5601307,2.2559744199974463,1.3298023122103466,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3'], ['CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2'], ['IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[16, 256, 688]",5.366246223449707,0,0,100,1,100,960,ga
DRAM_cycle,5,3,FasterRCNN.csv,1,4.027585740252135e-07,7448631,1.7852976100042365e-07,5601307,2.2559744199974463,1.3298023122103466,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3'], ['CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2'], ['IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[16, 256, 688]",7.0178515911102295,0,0,100,1,100,960,ga
DRAM_cycle,6,3,FasterRCNN.csv,1,4.027585740252135e-07,7448631,1.7852976100042365e-07,5601307,2.2559744199974463,1.3298023122103466,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3'], ['CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2'], ['IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[16, 256, 688]",8.966811418533325,0,0,100,1,100,960,ga
DRAM_cycle,7,3,FasterRCNN.csv,1,4.027585740252135e-07,7448631,1.7852976100042365e-07,5601307,2.2559744199974463,1.3298023122103466,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3'], ['CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2'], ['IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[16, 256, 688]",11.126467227935791,0,0,100,1,100,960,ga
DRAM_cycle,8,3,FasterRCNN.csv,1,4.027585740252135e-07,7448631,1.7852976100042365e-07,5601307,2.2559744199974463,1.3298023122103466,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3'], ['CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2'], ['IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[16, 256, 688]",13.596158981323242,0,0,100,1,100,960,ga
DRAM_cycle,9,3,FasterRCNN.csv,1,4.027585740252135e-07,7448631,1.7852976100042365e-07,5601307,2.2559744199974463,1.3298023122103466,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3'], ['CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2'], ['IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[16, 256, 688]",16.25459933280945,0,0,100,1,100,960,ga
DRAM_cycle,0,3,FasterRCNN.csv,1,3.3452211341704636e-07,8968017,1.7852976100042365e-07,5601307,1.8737610555376956,1.6010579316577362,"[['Conv1', 'CB2a_1'], ['CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2'], ['CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[6, 698, 256]",0.48816800117492676,0,0,100,1,100,960,ga
DRAM_cycle,1,3,FasterRCNN.csv,1,3.9658256868909234e-07,7564629,1.7852976100042365e-07,5601307,2.2213807180761935,1.3505114074268738,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2'], ['IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3'], ['IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[32, 757, 171]",1.334183692932129,0,0,100,1,100,960,ga
DRAM_cycle,2,3,FasterRCNN.csv,1,4.4351090327204604e-07,6764208,1.7852976100042365e-07,5601307,2.4842407270740345,1.2076124375971538,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2'], ['CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[86, 103, 771]",2.385617733001709,0,0,100,1,100,960,ga
DRAM_cycle,3,3,FasterRCNN.csv,1,4.4351090327204604e-07,6764208,1.7852976100042365e-07,5601307,2.4842407270740345,1.2076124375971538,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2'], ['CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[86, 103, 771]",3.7343764305114746,0,0,100,1,100,960,ga
DRAM_cycle,4,3,FasterRCNN.csv,1,4.988471642035257e-07,6013866,1.7852976100042365e-07,5601307,2.7941961127833577,1.0736540596685737,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3'], ['IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[362, 256, 342]",5.384758949279785,0,0,100,1,100,960,ga
DRAM_cycle,5,3,FasterRCNN.csv,1,4.988471642035257e-07,6013866,1.7852976100042365e-07,5601307,2.7941961127833577,1.0736540596685737,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3'], ['IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[362, 256, 342]",7.2375593185424805,0,0,100,1,100,960,ga
DRAM_cycle,6,3,FasterRCNN.csv,1,4.988471642035257e-07,6013866,1.7852976100042365e-07,5601307,2.7941961127833577,1.0736540596685737,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3'], ['IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[362, 256, 342]",9.29063081741333,0,0,100,1,100,960,ga
DRAM_cycle,7,3,FasterRCNN.csv,1,4.988471642035257e-07,6013866,1.7852976100042365e-07,5601307,2.7941961127833577,1.0736540596685737,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3'], ['IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[362, 256, 342]",11.661152839660645,0,0,100,1,100,960,ga
DRAM_cycle,8,3,FasterRCNN.csv,1,4.988471642035257e-07,6013866,1.7852976100042365e-07,5601307,2.7941961127833577,1.0736540596685737,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3'], ['IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[362, 256, 342]",14.124711513519287,0,0,100,1,100,960,ga
DRAM_cycle,9,3,FasterRCNN.csv,1,4.988471642035257e-07,6013866,1.7852976100042365e-07,5601307,2.7941961127833577,1.0736540596685737,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3'], ['IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[362, 256, 342]",16.78083848953247,0,0,100,1,100,960,ga
DRAM_cycle,10,3,FasterRCNN.csv,1,4.988471642035257e-07,6013866,1.7852976100042365e-07,5601307,2.7941961127833577,1.0736540596685737,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3'], ['IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[362, 256, 342]",19.749372482299805,0,0,100,1,100,960,ga
DRAM_cycle,11,3,FasterRCNN.csv,1,4.988471642035257e-07,6013866,1.7852976100042365e-07,5601307,2.7941961127833577,1.0736540596685737,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3'], ['IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[362, 256, 342]",22.721848964691162,0,0,100,1,100,960,ga
DRAM_cycle,12,3,FasterRCNN.csv,1,4.988471642035257e-07,6013866,1.7852976100042365e-07,5601307,2.7941961127833577,1.0736540596685737,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3'], ['IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[362, 256, 342]",26.095930576324463,0,0,100,1,100,960,ga
DRAM_cycle,13,3,FasterRCNN.csv,1,4.988471642035257e-07,6013866,1.7852976100042365e-07,5601307,2.7941961127833577,1.0736540596685737,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3'], ['IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[362, 256, 342]",29.57465434074402,0,0,100,1,100,960,ga
DRAM_cycle,14,3,FasterRCNN.csv,1,4.988471642035257e-07,6013866,1.7852976100042365e-07,5601307,2.7941961127833577,1.0736540596685737,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1'], ['CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3'], ['IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[362, 256, 342]",33.35159683227539,0,0,100,1,100,960,ga
Cycles,0,3,FasterRCNN.csv,1,5.38835490291801e-07,5567562,2.621658728720979e-07,3814379,2.05532277862375,1.4596247514995233,"[['Conv1'], ['CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2'], ['CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[8, 256, 696]",0.586930513381958,0,0,100,1,100,960,ga
Cycles,1,3,FasterRCNN.csv,1,5.51339037119452e-07,5441298,2.621658728720979e-07,3814379,2.1030160450686584,1.4265226397272006,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s'], ['IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1', 'IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3'], ['CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1', 'IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[26, 171, 763]",1.319617748260498,0,0,100,1,100,960,ga
Cycles,2,3,FasterRCNN.csv,1,6.780773523520469e-07,4424274,2.621658728720979e-07,3814379,2.586444013187249,1.1598936550353283,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1'], ['IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1'], ['IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[256, 128, 576]",2.2665200233459473,0,0,100,1,100,960,ga
Cycles,3,3,FasterRCNN.csv,1,6.780773523520469e-07,4424274,2.621658728720979e-07,3814379,2.586444013187249,1.1598936550353283,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1'], ['IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1'], ['IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[256, 128, 576]",3.6104960441589355,0,0,100,1,100,960,ga
Cycles,4,3,FasterRCNN.csv,1,6.780773523520469e-07,4424274,2.621658728720979e-07,3814379,2.586444013187249,1.1598936550353283,"[['Conv1', 'CB2a_1', 'CB2a_2', 'CB2a_3', 'CB2s', 'IB2b_1', 'IB2b_2', 'IB2b_3', 'IB2c_1', 'IB2c_2', 'IB2c_3', 'CB3a_1', 'CB3a_2', 'CB3a_3', 'CB3s', 'IB3b_1'], ['IB3b_2', 'IB3b_3', 'IB3c_1', 'IB3c_2', 'IB3c_3', 'IB3d_1', 'IB3d_2', 'IB3d_3', 'CB4a_1', 'CB4a_2', 'CB4a_3', 'CB4s', 'IB4b_1', 'IB4b_2', 'IB4b_3', 'IB4c_1'], ['IB4c_2', 'IB4c_3', 'IB4d_1', 'IB4d_2', 'IB4d_3', 'IB4e_1', 'IB4e_2', 'IB4e_3', 'IB4f_1', 'IB4f_2', 'IB4f_3', 'RPN_Conv1', 'RPN_Conv_bbox', 'RPN_Conv3_cls']]","[256, 128, 576]",5.159518003463745,0,0,100,1,100,960,ga
......@@ -12,14 +12,14 @@ do
for res_unit in 960;
do
for target in DRAM_cycle;
do
do
echo $net $partitions $target
python3 ../approaches/brute_force_approach.py \
${net} \
${partitions} \
${res_unit} \
${target}
done
done
done
done
done
......@@ -10,7 +10,7 @@ declare -a max_partitions=(23 14 9 29 8 8 8 27 13)
#tp_gain, latency_penalty, \
#best_layer_partition, best_resource_partition, \
#time_taken, sigma, seed, valid_sampling_percentage, \
#trial, popsize, res_unit, seeding_type" > cma.csv
#trial, popsize, res_unit, seeding_type" > ../resulting_csv/cma.csv
for i in 8;
do
......@@ -25,14 +25,14 @@ do
do
for target in DRAM_cycle Cycles;
do
echo $net $partitions $strategy
python3 ../approaches/cma_approach.py \
${net} \
${partitions} \
${popsize} \
${res_unit} \
${strategy} \
${target}
echo $net $partitions $strategy
python3 ../approaches/cma_approach.py \
${net} \
${partitions} \
${popsize} \
${res_unit} \
${strategy} \
${target}
done
done
done
......
......@@ -4,13 +4,13 @@ declare -a nets=(FasterRCNN mobilenet yolo_tiny googlenet alexnet AlphaGoZero nc
declare -a layers=(46 27 10 58 8 8 8 53)
declare -a max_partitions=(23 14 9 29 8 8 8 27)
echo "target, evo_counter,partitions,topology, feasable, \
tp_partition, latency_partition, \
tp_fullmap, latency_fm, \
tp_gain, latency_penalty, \
best_layer_partition, best_resource_partition, \
time_taken, sigma, seed, valid_sampling_percentage, \
trial, popsize, res_unit, seeding_type" > ga.csv
# echo "target, evo_counter,partitions,topology, feasable, \
# tp_partition, latency_partition, \
# tp_fullmap, latency_fm, \
# tp_gain, latency_penalty, \
# best_layer_partition, best_resource_partition, \
# time_taken, sigma, seed, valid_sampling_percentage, \
# trial, popsize, res_unit, seeding_type" > ../resulting_csv/ga.csv
for i in 0 1 2 3 4 5 6 7;
do
......@@ -24,16 +24,16 @@ do
for res_unit in 960;
do
for target in DRAM_cycle Cycles;
do
do
echo $net $partitions $target
python3 ga_approach.py \
python3 ../approaches/ga_approach.py \
${net} \
${partitions} \
${elite_popsize} \
${popsize} \
${res_unit} \
${target}
done
${target}
done
done
done
done
......
......@@ -4,13 +4,13 @@ declare -a nets=(FasterRCNN mobilenet yolo_tiny googlenet alexnet AlphaGoZero nc
declare -a layers=(46 27 10 58 8 8 8 53)
declare -a max_partitions=(23 14 9 29 8 8 8 27)
echo "target, evo_counter,partitions,topology, feasable, \
tp_partition, latency_partition, \
tp_fullmap, latency_fm, \
tp_gain, latency_penalty, \
best_layer_partition, best_resource_partition, \
time_taken, sigma, seed, valid_sampling_percentage, \
trial, popsize, res_unit, seeding_type" > hyperopt.csv
# echo "target, evo_counter,partitions,topology, feasable, \
# tp_partition, latency_partition, \
# tp_fullmap, latency_fm, \
# tp_gain, latency_penalty, \
# best_layer_partition, best_resource_partition, \
# time_taken, sigma, seed, valid_sampling_percentage, \
# trial, popsize, res_unit, seeding_type" > ../resulting_csv/hyperopt.csv
for i in 0 1 2 3 4 5 6 7;
do
......@@ -20,15 +20,15 @@ do
for res_unit in 960;
do
for target in DRAM_cycle Cycles;
do
do
echo $net $partitions $target
python3 hyper_parameter_ga.py \
python3 ../approaches/hyper_parameter_ga.py \
${net} \
${partitions} \
${res_unit} \
${target} \
2500
done
done
done
done
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment