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

average_output flag flipped? #2

Open
ruslanmustafin opened this issue Jul 9, 2019 · 0 comments
Open

average_output flag flipped? #2

ruslanmustafin opened this issue Jul 9, 2019 · 0 comments

Comments

@ruslanmustafin
Copy link

Hi, nice work with the project!

I was going through your code when I noticed this piece (sorry cant link to the precise line in a jupyter notebook, but it's in the OutputDataToSpikingPerceptronLayer class):

class OutputDataToSpikingPerceptronLayer(nn.Module):
...   
        if average_output:
            self.reducer = lambda x, dim: x.sum(dim=dim)
        else:
            self.reducer = lambda x, dim: x.mean(dim=dim)
...

From you comments, it seems that the correct version should be

        if average_output:
            self.reducer = lambda x, dim: x.mean(dim=dim)
        else:
            self.reducer = lambda x, dim: x.sum(dim=dim)

i.e. if average_output flag is True, compute mean, otherwise do a sum?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant