You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 .
for batch in tqdm(mixing_generator, total=N_total//batch_size):
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])
The text was updated successfully, but these errors were encountered:
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 ran into this issue when running the training_models notebook. The issue is that torch max uses 'dim' as the keyword argument and numpy max uses 'axis'.
The variable 'mixed_clips_batch' is converted to a numpy array here:
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])
The text was updated successfully, but these errors were encountered: