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

Some questions about MinibatchStatConcatLayer #16

Open
lyhangustc opened this issue Jan 23, 2018 · 0 comments
Open

Some questions about MinibatchStatConcatLayer #16

lyhangustc opened this issue Jan 23, 2018 · 0 comments

Comments

@lyhangustc
Copy link

I have some questions about MinibatchStatConcatLayer. They are mostly about the shape of the vals in the code.
Let's say the shape of the input x is [b, c, h, w]

After this line:

vals = self.adjusted_std(x, dim=0, keepdim=True)# per activation, over minibatch dim

the shape of vals should be [1, c, h, w].

  1. For the case of "all ", we should get vals of shape [1, 1, 1, 1], since it is to "average everything --> 1 value per minibatch". However, this line

    vals = torch.mean(vals, dim=1, keepdim=True)#vals = torch.mean(vals, keepdim=True)

    outputs vals of shape [1, 1, h, w].
    I think we should use vals = torch.mean(vals, keepdim=True) instead, which you have commented for an unknown reason.

  2. What is the purpose of this line?

    target_shape = [target_shape[0]] + [s for s in target_shape[1:]]

    It seems like 'target_shape = target_shape' and we still get [b, c, h, w].

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