Open pi19404 opened 2 months ago
I'm not sure I understand the issue, it looks like your corrected line is the same?
Also, while mix_clips_batch
still works, the official training process uses the augment_clips
function, which should perform a bit better and be more efficient.
I am using the function openwakeword.data.mix_clips_batch to mix foreground and background clips at desired snr levels . And getting the below error .
File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/tqdm/std.py", line 1181, in iter for obj in iterable: File "/workspace/f1/openwakeword_eval/openwakeword/data.py", line 466, in mix_clips_batch error_index = torch.from_numpy(np.where(mixed_clips_batch.max(dim=1) != 0)[0]) TypeError: _amax() got an unexpected keyword argument 'dim'
To resolve the issue I had to make changes in data.py file replace the line error_index = torch.from_numpy(np.where(mixed_clips_batch.max(dim=1) != 0)[0]) with error_index = torch.from_numpy(np.where(mixed_clips_batch.max(dim=1) != 0)[0])