Skip to content

Commit

Permalink
formatted code using black
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Woolford committed Sep 6, 2024
1 parent 584f315 commit b6253ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions deepxde/nn/pytorch/fnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
class FNN(NN):
"""Fully-connected neural network."""

def __init__(self, layer_sizes, activation, kernel_initializer, regularization=None):
def __init__(
self, layer_sizes, activation, kernel_initializer, regularization=None
):
super().__init__()
if isinstance(activation, list):
if not (len(layer_sizes) - 1) == len(activation):
Expand All @@ -31,9 +33,10 @@ def __init__(self, layer_sizes, activation, kernel_initializer, regularization=N
)
initializer(self.linears[-1].weight)
initializer_zero(self.linears[-1].bias)
self.regularizer=regularization
self.regularizer = regularization
# currently list with two components: regularization type, weight decay
# currently supports l2 regularization

def forward(self, inputs):
x = inputs
if self._input_transform is not None:
Expand Down

0 comments on commit b6253ca

Please sign in to comment.