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

MLPs wrong skip connection #27

Open
SirSykon opened this issue Nov 7, 2022 · 0 comments
Open

MLPs wrong skip connection #27

SirSykon opened this issue Nov 7, 2022 · 0 comments

Comments

@SirSykon
Copy link

SirSykon commented Nov 7, 2022

Hello,

According to paper, MLPs skip connection is on layer 2 (starting from 0 is the third one) but using nerfactor I've seen strange behaviour so I checked the code. Network .call() in mlp.py does the following:

    x_ = x + 0 # make a copy
    for i, layer in enumerate(self.layers):
        y = layer(x_)
        if i in self.skip_at:
            y = tf.concat((y, x), -1)
        x_ = y
    return y

So the concatenation is applied after calling the layer and therefore the true skip connection is at the next layer (the fourth one).

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