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

Incorrect layer definition in Pytorch implementation #9

Closed
Vikramank opened this issue Sep 23, 2022 · 1 comment
Closed

Incorrect layer definition in Pytorch implementation #9

Vikramank opened this issue Sep 23, 2022 · 1 comment

Comments

@Vikramank
Copy link

Hello,
In the pytorch implementation (https://github.com/lu-group/sbinn/blob/main/sbinn/sbinn_pytorch.py#L131), the input layer size is incorrectly defined to be #6. As per the paper only time is the input right? Also in the TF implementation the layer size is one.
I think the correct version should be
net = dde.maps.FNN([1] + [128] * 3 + [6], "swish", "Glorot normal")

@mitchelldaneker
Copy link
Collaborator

We use an input transform turning t into 0.01*t, and periodic features of sin(t), sin(2t), etc. In total, we have 6 features which is 6 inputs. Pytorch needs to know that there are 6 inputs. Tensorflow automatically figures out that there are 6 inputs, which is why it appears that there is only 1 input in the code.

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

2 participants