Skip to content

Commit

Permalink
[keras/legacy_tf_layers/migration_utils.py] Move docstring from metho…
Browse files Browse the repository at this point in the history
…d to class and document `seed`
  • Loading branch information
SamuelMarks committed Apr 23, 2023
1 parent 5331dac commit 1801651
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions keras/legacy_tf_layers/migration_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ class DeterministicRandomTestTool(object):
This applies both to the stateful random operations used for creating and
initializing variables, and to the stateful random operations used in
computation (such as for dropout layers).
Args:
mode: Set mode to 'constant' or 'num_random_ops'. Defaults to
'constant'.
seed: The random seed to use.
"""

def __init__(self, seed: int = 42, mode="constant"):
"""
Args:
mode: Set mode to 'constant' or 'num_random_ops'. Defaults to
'constant'.
"""
if mode not in {"constant", "num_random_ops"}:
raise ValueError(
"Mode arg must be 'constant' or 'num_random_ops'. "
Expand Down

0 comments on commit 1801651

Please sign in to comment.