Skip to content

Commit

Permalink
Minor documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmaddison committed Dec 3, 2024
1 parent e23bdc6 commit 2b921af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions bt_ocean/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ class Dynamics(keras.layers.Layer):
update : callable
Passed `dynamics` and any arguments defined by `args`, and should
update the state of `dynamics`. Evaluated before taking each timestep.
Must not modify elements of `args` and must have no side effects.
Must not modify elements of `args` and must have no side effects other
than to modify `dynamics`.
args : tuple
Passed as remaining arguments to `update`.
N : Integral
Expand All @@ -128,8 +129,9 @@ class Dynamics(keras.layers.Layer):
--------
The `update` callable can modify the `dynamics` argument, but must not
change any elements of `args`, and must have no side effects. This e.g.
means that batch normalization cannot be used in a nested neural network.
change any elements of `args`, and must have no other side effects. This
e.g. means that batch normalization cannot be used in a nested neural
network.
"""

_update_registry = {}
Expand Down
3 changes: 2 additions & 1 deletion tests/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def test_dynamics_roundtrip(tmp_path):
Q_network = keras.models.Model(inputs=Q_input_layer, outputs=Q_input_layer)

# Used to test that Q_callback is being called, although technically
# Q_callback is not allowed to have any side effects
# Q_callback is not allowed to have any side effects other than to modify
# the dynamics argument
n_calls = 0

@Dynamics.register_update("test_dynamics_roundtrip_Q_callback")
Expand Down

0 comments on commit 2b921af

Please sign in to comment.