rtaori/Black-Box-Audio

error in run_audio_attack.py

shudong-zhang opened this issue · 4 comments

ValueError: Input tensor 'ExpandDims:0' enters the loop with shape (1, 11), but has shape (1, ?) after one iteration. To allow the shape to vary across iterations, use the shape_invariants argument of tf.while_loop to specify a less-specific shape.

When I run run_audio_attack.py, I got an error list above.How to solve it ?

Hi,
It seems the DeepSpeech repo has been updated since this work was done. Could you try following the suggestion in #4 ?

I can pass the make_checkpoint.py, so I don't think the error casued by version.

Right yes, but run_audio_attack.py still makes calls to the DeepSpeech library, so if anything there has changed then it could break the program. Could you try reverting to the commit specified in #4? I have tested it on that version so it should work.

hi @zhangdong1992,

I have updated the installation instructions with much more detail in the README.
Please follow the steps there and open another issue if you still have any problems.