Skip to content

Commit

Permalink
Code update
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 561839173
  • Loading branch information
The swirl_dynamics Authors committed Sep 1, 2023
1 parent e0402b1 commit 8386eee
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions swirl_dynamics/projects/ergodic/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,19 @@ def sample_uniform_spherical_shell(
vec /= vec_norm

return vec * sampling_radius.reshape(broadcasting_shape)


def linear_scale_dissipative_target(inputs: Array, scale: float = 1.0):
"""Function to rescale the random input to bias the model.
Arguments:
inputs: Input point in state space.
scale: Real number in [0, 1] that scales down input.
Returns:
The rescaled input, scale*input.
This function is implemented to follow the implementation of the Markov Neural
Operator (MNO).
"""
return scale * inputs

0 comments on commit 8386eee

Please sign in to comment.