Skip to content

Using feature extraction layers #455

Answered by csukuangfj
desh2608 asked this question in Q&A
Discussion options

You must be logged in to vote

As far as I can tell, the input shape of x should be

(batch_size, num_samples)

However, there is incorrect documentation in the code.


You can find the correct shape for x by reading the following code:

x_strided = self.wav2win(x)

def forward(self, x: torch.Tensor) -> torch.Tensor:
# Add dither
if self.dither != 0.0:
n = torch.randn(x.shape, device=x.device)
x = x + self.dither * n
# remove offset
if self.remove_dc_offset:
mu = torch.mean(x, dim=1, keepdim=True)
x = x - mu
if self.r…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@desh2608
Comment options

desh2608 Nov 6, 2021
Collaborator Author

@csukuangfj
Comment options

@desh2608
Comment options

desh2608 Nov 6, 2021
Collaborator Author

@pzelasko
Comment options

@pzelasko
Comment options

Answer selected by desh2608
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants