-
Notifications
You must be signed in to change notification settings - Fork 700
Batching for transforms #337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'd also update the README alongside this to explain the ellipsis convention. |
Updated. We were already using ellipses in the README. :) |
README.md
Outdated
@@ -129,7 +129,7 @@ Transforms expect and return the following dimensions. | |||
* `MuLawDecode`: (channel, time) -> (channel, time) | |||
* `Resample`: (channel, time) -> (channel, time) | |||
|
|||
Complex numbers are supported via tensors of dimension (..., 2), and torchaudio provides `complex_norm` and `angle` to convert such a tensor into its magnitude and phase. | |||
Complex numbers are supported via tensors of dimension (..., 2), and torchaudio provides `complex_norm` and `angle` to convert such a tensor into its magnitude and phase. Here, and in the documentation, we use ellipsis "..." as a placeholder for the rest of the dimensions of a tensor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also briefly mention the purpose of that (i.e. batching, etc.). "rest of the dimensions" to me at least doesn't imply a functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree: "we use an ellipsis "..." as a placeholder for the rest of the dimensions of a tensor, e.g. an optional batching dimension."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. See small comment.
Extends #327 to other transforms.
Fixes #336 also.