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

Update deeponet.py #1023

Merged
merged 3 commits into from
Nov 16, 2022
Merged

Update deeponet.py #1023

merged 3 commits into from
Nov 16, 2022

Conversation

MinZhu123
Copy link
Contributor

untrainable bias

untrainable bias
@lululxvi
Copy link
Owner

Also fix mionet.py

@@ -42,7 +42,7 @@ def __init__(
# Fully connected network
self.branch = FNN(layer_sizes_branch, activation_branch, kernel_initializer)
self.trunk = FNN(layer_sizes_trunk, self.activation_trunk, kernel_initializer)
self.b = torch.tensor(0.0, requires_grad=True)
self.b = torch.nn.Parameter(torch.tensor(0.0), requires_grad=True)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.b = torch.nn.parameter.Parameter(torch.tensor(0.0))

@lululxvi
Copy link
Owner

Use torch.nn.parameter.Parameter not torch.nn.Parameter

@lululxvi lululxvi merged commit 229a997 into lululxvi:master Nov 16, 2022
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

Successfully merging this pull request may close these issues.

2 participants