Skip to content
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

In Random Window Discriminator, feats is an empty list #397

Closed
akashrajkn opened this issue Mar 23, 2021 · 3 comments
Closed

In Random Window Discriminator, feats is an empty list #397

akashrajkn opened this issue Mar 23, 2021 · 3 comments
Labels
wontfix This will not be worked on but feel free to help.

Comments

@akashrajkn
Copy link

akashrajkn commented Mar 23, 2021

In Random Window discriminator, feats list is defined, but it is not updated. Is this by design?

    def forward(self, x, c):
        scores = []
        feats = []
        # unconditional pass
        for (window_size, layer) in zip(self.window_sizes,
                                        self.unconditional_discriminators):
            index = np.random.randint(x.shape[-1] - window_size)

            score = layer(x[:, :, index:index + window_size])
            scores.append(score)

        # conditional pass
        for (window_size, layer) in zip(self.window_sizes,
                                        self.conditional_discriminators):
            frame_size = window_size // self.hop_length
            lc_index = np.random.randint(c.shape[-1] - frame_size)
            sample_index = lc_index * self.hop_length
            x_sub = x[:, :,
                      sample_index:(lc_index + frame_size) * self.hop_length]
            c_sub = c[:, :, lc_index:lc_index + frame_size]

            score = layer(x_sub, c_sub)
            scores.append(score)
        return scores, feats

Also, thank you for this project. It's awesome :)

@erogol
Copy link
Member

erogol commented Mar 23, 2021

feats is just a place holder to match the MelganDiscriminator outputs to be able to combine them.
But if you need the feats, maybe you can consider a PR :)

Thanks for your good words 👍

@akashrajkn
Copy link
Author

akashrajkn commented Mar 30, 2021

Thanks for the reply.

But if you need the feats, maybe you can consider a PR :)

Great, I'll test whether feature loss helps and then make a PR

@stale
Copy link

stale bot commented Apr 29, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

@stale stale bot added the wontfix This will not be worked on but feel free to help. label Apr 29, 2021
@stale stale bot closed this as completed May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on but feel free to help.
Projects
None yet
Development

No branches or pull requests

2 participants