Skip to content

Commit

Permalink
whisper : fix DTW assert (#2299)
Browse files Browse the repository at this point in the history
  • Loading branch information
arizhih authored Jul 15, 2024
1 parent d207c68 commit 7ae885c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/whisper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7220,9 +7220,10 @@ struct median_filter_user_data {
};

static void median_filter(struct ggml_tensor * dst , const struct ggml_tensor * a, int ith, int nth, void * userdata) {
if (ith != 0) {
return;
}
int filter_width = ((median_filter_user_data *) userdata)->filter_width;
WHISPER_ASSERT(nth == 1);
WHISPER_ASSERT(ith == 0);
WHISPER_ASSERT(filter_width < a->ne[2]);
WHISPER_ASSERT(filter_width % 2);
WHISPER_ASSERT(ggml_n_dims(a) == 3);
Expand Down

0 comments on commit 7ae885c

Please sign in to comment.