Commit 013a6c7b authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TensorFlower Gardener
Browse files

Add assertion to prevent generation of degenerate linear_to_mel_weight_matrix.

Prior to this change if upper_edge_hertz is larger than sample_rate / 2 (the highest frequency present in the linear spectrogram), the returned matrix would contain columns that are all zeros.

This is likely a surprising result for those that are unfamiliar with signal processing, so it seems safer to raise an exception on such a misconfiguration than to silently allow users to generate poorly behaved features.

PiperOrigin-RevId: 181407176
parent d902f953
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment