Skip to content

Documentation fix to contrib.signals - #15877

Merged
rmlarsen merged 3 commits into
tensorflow:masterfrom
dsalaj:patch-1
Jan 24, 2018
Merged

rmlarsen merged 3 commits into
tensorflow:masterfrom
dsalaj:patch-1

Conversation

@dsalaj

@dsalaj dsalaj commented Jan 5, 2018

Copy link
Copy Markdown
Contributor

Fixed very confusing little typo.
The input signals is segmented into variable number of frames (with frame_length=256).
frame_step is the stride, not the size of a frame/window.

Fixed very confusing little typo
@tensorflow-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@caisq
caisq requested a review from rryan January 5, 2018 15:01
@caisq caisq self-assigned this Jan 5, 2018
@caisq caisq added the awaiting review Pull request awaiting review label Jan 5, 2018

# `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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, you are right

@@ -34,8 +34,8 @@ with inner structure (e.g. a spectrogram):
magnitude_spectrograms = tf.abs(tf.contrib.signal.stft(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you please also fix the 127 in the above comment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@rmlarsen

Copy link
Copy Markdown
Contributor

@rryan Could you take another look, please?

@rryan rryan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rmlarsen rmlarsen added awaiting testing (then merge) and removed awaiting review Pull request awaiting review labels Jan 24, 2018
@rmlarsen
rmlarsen merged commit 64cbff3 into tensorflow:master Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants