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

FNN class constructor does not contain regularization implementation for PyTorch backend #1703

Open
cwoolfo1 opened this issue Apr 8, 2024 · 1 comment

Comments

@cwoolfo1
Copy link

cwoolfo1 commented Apr 8, 2024

The FFN class constructor for the PyTorch backend does not contain the option to set regularization in its initialization despite having the regularizer as a attribute of the nn base class.

I had to set it manually in my code


net = dde.nn.FNN(layer_size, activation, initializer)
net.regularizer = ["l2", 1e-6]

@lululxvi
Copy link
Owner

Feel free to submit a PR to improve 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