The interface exposes two repair parameters, namely n and num_core:
|
def PNN_MNIST(repair_num, n, num_core, remove_redundant_constraint=False): |
Regarding n, how would the user determine it? Is n=0.5 as used in PNN_MNIST.py always a reasonable choice?
|
PNN_MNIST(num, 0.5, num_core=10, remove_redundant_constraint=False) |
Regarding num_core, considering it actually controls the number of buggy inputs to be repaired in parallel, would os.cpu_count() always be a reasonable choice?
|
pool = multiprocessing.Pool(core_num) |
|
if self.buggy_points is not None: |
|
arg_list = [[self.buggy_points[i], self.P[i], self.ql[i], self.qu[i], is_gurobi] for i in |
|
range(len(self.buggy_points))] |
|
res = pool.starmap(self.PatchForOnePoint, arg_list) |
|
else: |
|
arg_list = [[self.linear_regions[i][0], self.linear_regions[i][1], self.linear_regions[i][2], self.P[i], |
|
self.ql[i], self.qu[i]] for i in range(len(self.linear_regions))] |
|
res = pool.starmap(self.PatchForOneLinearRegion, arg_list) |
|
pool.close() |
|
g_list, cd_list = [res_g[0] for res_g in res], [res_g[1] for res_g in res] |
The interface exposes two repair parameters, namely
nandnum_core:REASSURE/ICLR/Experiments/MNIST/PNN_MNIST.py
Line 12 in 4781c8e
Regarding
n, how would the user determine it? Isn=0.5as used inPNN_MNIST.pyalways a reasonable choice?REASSURE/ICLR/Experiments/MNIST/PNN_MNIST.py
Line 59 in 4781c8e
Regarding
num_core, considering it actually controls the number of buggy inputs to be repaired in parallel, wouldos.cpu_count()always be a reasonable choice?REASSURE/ICLR/tools/build_PNN.py
Lines 234 to 244 in 4781c8e