Repository navigation
Documentation fix to contrib.signals - #15877
Conversation
Fixed very confusing little typo
|
Can one of the admins verify this patch? |
|
|
||
| # `spectrogram_patches` is a [batch_size, ?, 64, 127] tensor containing a | ||
| # variable number of [64, 127] spectrogram patches per batch item. | ||
| # `spectrogram_patches` is a [batch_size, ?, 256, 127] tensor containing a |
There was a problem hiding this comment.
Hm, I think the comment is correct (except I just noticed that 127 should be 129 😱, 256 // 2 + 1 == 129).
magnitude_spectrograms is a [batch_size, ?, 129] tensor, and the below tf.contrib.signal.frame frames axis=1 with frame_length 64, producing a variable number of [64, 129] patches of that original spectrogram.
I copied these lines into a Colab to demonstrate:
https://colab.research.google.com/notebook#fileId=1n5An3VoFtb6pHH1KUe46j7yRHd3aFUbG
There was a problem hiding this comment.
Is it possible you were thinking this comment applied to magnitude_spectrograms above? It's describing the result of computing spectrogram_patches on line 39.
| @@ -34,8 +34,8 @@ with inner structure (e.g. a spectrogram): | |||
| magnitude_spectrograms = tf.abs(tf.contrib.signal.stft( | |||
There was a problem hiding this comment.
Thanks! Could you please also fix the 127 in the above comment?
|
@rryan Could you take another look, please? |
Fixed very confusing little typo.
The input
signalsis segmented into variable number of frames (with frame_length=256).frame_stepis the stride, not the size of a frame/window.