Beispiel #1
0
 def __init__(self, filenamePostfix):
     self.runningTime = {}
     self.manipulationPercentage = {}
     self.l2Distance = {}
     self.l1Distance = {}
     self.l0Distance = {}
     self.confidence = {}
     assure_path_exists("dataCollection/")
     self.fileName = "dataCollection/%s.txt" % filenamePostfix
     self.fileHandler = open(self.fileName, 'a')
     self.maxFeatures = {}
 def __init__(self, data_set):
     self.data_set = data_set
     self.num_of_classes = 84
     self.optimizer = 'Adadelta'
     self.regParam = 0.001
     self.height = 32
     self.width = 128
     self.batch_size = 32
     self.loss = ctc(32, 10)
     self.util = utils(32, 1, CHAR_VECTOR, 32, 128)
     assure_path_exists("%s_pic/" % self.data_set)
     self._build_model()
Beispiel #3
0
 def __init__(self, data_set, abits, wbits, network_type, seed):
     self.network_type = network_type
     self.abits = abits
     self.wbits = wbits
     self.data_set = data_set
     self.seed = seed
     self.model = Sequential()
     cfDeep = self.myCF(self)
     if self.data_set == 'mnist':
         cfg = 'config_MNIST'
     if self.data_set == 'fashion':
         cfg = 'config_FASHION'
     if self.data_set == 'cifar10':
         cfg = 'config_CIFAR-10'
     self.cf = Config(cfg, cmd_args=cfDeep.myDict)
     print("Dataset: " + str("%s_pic/" % self.data_set))
     assure_path_exists("%s_pic/" % self.data_set)
Beispiel #4
0
 def __init__(self, data_set):
     self.data_set = data_set
     self.model = Sequential()
     assure_path_exists("%s_pic/" % self.data_set)