Skip to content

Commit

Permalink
Backend pytorch: Bug fix: DeepONetCartesianProd and PODDeepONet (lulu…
Browse files Browse the repository at this point in the history
  • Loading branch information
MinZhu123 authored Nov 16, 2022
1 parent 9c5d331 commit 229a997
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepxde/nn/pytorch/deeponet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.Parameter(torch.tensor(0.0))
self.regularizer = regularization

def forward(self, inputs):
Expand Down Expand Up @@ -120,7 +120,7 @@ def __init__(
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.Parameter(torch.tensor(0.0))
self.regularizer = regularization

def forward(self, inputs):
Expand Down

0 comments on commit 229a997

Please sign in to comment.