-
Notifications
You must be signed in to change notification settings - Fork 615
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
Allow extra dimensions with extent 1 in Spectrogram operator & AudioDecoder changes #1679
Conversation
!build |
CI MESSAGE: [1083375]: BUILD STARTED |
CI MESSAGE: [1083381]: BUILD STARTED |
CI MESSAGE: [1083375]: BUILD PASSED |
CI MESSAGE: [1083381]: BUILD PASSED |
I'm gonna improve this PR with AudioDecoder stuff, please don't merge yet |
!build |
CI MESSAGE: [1083750]: BUILD STARTED |
Can we add some test: FileReader->AudioDecoder->Spectrogram test to see if that works? |
Upssss, forgot about it, adding! |
@@ -0,0 +1,115 @@ | |||
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. |
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.
You need to run this test as well.
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.
Why not just make it as another case in the existing test_operator_spectrogram.py ?
out = np.abs( | ||
librosa.stft(y=input_data, n_fft=nfft, hop_length=win_step, window=hann_win)) ** 2 | ||
|
||
# Alternative way to calculate the spectrogram: |
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.
It could be removed
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.
Done
!build |
CI MESSAGE: [1084339]: BUILD STARTED |
CI MESSAGE: [1084339]: BUILD FAILED |
!build |
CI MESSAGE: [1085295]: BUILD STARTED |
CI MESSAGE: [1085295]: BUILD PASSED |
read, _ = self.input() | ||
audio, rate = self.decode(read) | ||
spec = self.fft(audio) | ||
return spec |
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.
Can you also return the data from decode
and validate their shapes?
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.
That's already tested, here
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.
Minor nitpicks written above, also please adjust the test file name as Janusz suggests.
|
!build |
CI MESSAGE: [1087534]: BUILD STARTED |
CI MESSAGE: [1087534]: BUILD FAILED |
b620ef0
to
560f907
Compare
I'd simply add those as another set of test cases in |
Signed-off-by: Joaquin Anton <janton@nvidia.com>
560f907
to
1bd6dc7
Compare
CI MESSAGE: [1087534]: BUILD PASSED |
Signed-off-by: Michał Szołucha <mszolucha@nvidia.com>
Signed-off-by: Michał Szołucha <mszolucha@nvidia.com>
!build |
CI MESSAGE: [1088023]: BUILD STARTED |
CI MESSAGE: [1088023]: BUILD PASSED |
Signed-off-by: Joaquin Anton janton@nvidia.com
Why we need this PR?
Pick one, remove the rest
What happened in this PR?
Fill relevant points, put NA otherwise. Replace anything inside []
JIRA TASK: [Use DALI-XXXX or NA]