Skip to content

Commit

Permalink
update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
lijialin03 committed Dec 9, 2024
1 parent c7e909a commit c773a2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepxde/nn/regularizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


def get(identifier):
"""Retrieves a TensorFlow regularizer instance based on the given identifier.
"""Retrieves a regularizer instance based on the given identifier.
Args:
identifier (list/tuple): Specifies the type and factor(s) of the regularizer.
Expand All @@ -27,7 +27,7 @@ def get(identifier):
if name == "l2":
return bkd.l2_regularization(factor[0])
if name in ("l1l2", "l1+l2"):
# TODO: only supported by 'tensorflow.compat.v1' now.
# TODO: only supported by 'tensorflow.compat.v1' and 'tensorflow' now.
if len(factor) < 2:
raise ValueError("L1L2 regularizer requires both L1/L2 penalties.")
return bkd.l1_l2_regularization(factor[0], factor[1])
Expand Down

0 comments on commit c773a2f

Please sign in to comment.