Use tf.abs in compute_spectrogram_tf

To avoid the following error: `Cannot convert a symbolic Tensor (transpose_1:0) to a numpy array`
This commit is contained in:
Martin Chloride
2020-05-07 02:00:31 -07:00
parent ca938960f4
commit 9513380c76

View File

@@ -44,7 +44,7 @@ def compute_spectrogram_tf(
periodic=True,
dtype=waveform.dtype) ** window_exponent),
perm=[1, 2, 0])
return np.abs(stft_tensor) ** spec_exponent
return tf.abs(stft_tensor) ** spec_exponent
def time_stretch(