neuzz
neuzz copied to clipboard
Crash in nn.py if no new seeds are found
It looks like Neuzz will currently crash if no new edges are uncovered during a particular round, because new_seed_list
will be empty.
Backtrace:
Epoch 100/100
1/2 [===========>..................] - ETA: 0s - batch: 0.0000e+00 - size: 8.0000 - loss: 0.2662 - accur_1: 0.78382.8247524899999983e-05
3/2 [====================================] - 0s 2ms/step - batch: 1.0000 - size: 10.6667 - loss: 0.2772 - accur_1: 0.7724
#######debug1
Traceback (most recent call last):
File "nn.py", line 417, in <module>
setup_server()
File "nn.py", line 411, in setup_server
gen_grad(data)
File "nn.py", line 392, in gen_grad
gen_mutate2(model, 500, data[:5] == b"train")
File "nn.py", line 316, in gen_mutate2
rand_seed1 = [new_seed_list[i] for i in np.random.choice(len(new_seed_list), edge_num, replace=True)]
File "mtrand.pyx", line 894, in numpy.random.mtrand.RandomState.choice
ValueError: a must be greater than 0 unless no samples are taken