Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in nn.py if no new seeds are found #22

Open
moyix opened this issue Oct 13, 2020 · 0 comments
Open

Crash in nn.py if no new seeds are found #22

moyix opened this issue Oct 13, 2020 · 0 comments

Comments

@moyix
Copy link

moyix commented Oct 13, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant