deepspeech2-pytorch-adversarial-attack icon indicating copy to clipboard operation
deepspeech2-pytorch-adversarial-attack copied to clipboard

can't set model.eval

Open libowen424 opened this issue 2 years ago • 3 comments

When i run attack(), i need model.eval() and get loss to optime the adversarial example. However, it run error RuntimeError: cudnn RNN backward can only be called in training mode. To solve this error, i add torch.backends.cudnn.enabled = False at the beginning of the file. But i can't get a adversarial example. thanks for your reply

libowen424 avatar Nov 17 '22 04:11 libowen424