nnrl/nn/actor/policy/deterministic.py
def add_gaussian_noise(cls, policy, noise_stddev: float):
        """Adds a zero-mean Gaussian noise module to a DeterministicPolicy.

        Args:
            policy: The deterministic policy.
            noise_stddev: Standard deviation of the Gaussian noise

        Returns:
            A deterministic policy sharing all paremeters with the input one and
            with additional noise module before squashing.
        """
        if policy.noise is not None:
            warnings.warn(
                "Adding Gaussian noise to already noisy policy. Are you sure you"
                " called `add_gaussian_noise` on the right policy?"
            )
        noise = nnx.GaussianNoise(noise_stddev)
        return cls(policy.encoder, policy.action_linear, policy.squashing, noise=noise)
Adds a zero-mean Gaussian noise module to a DeterministicPolicy.

        Args:
            policy: The deterministic policy.
            noise_stddev: Standard deviation of the Gaussian noise

        Returns:
            A deterministic policy sharing all paremeters with the input one and
            with additional noise module before squashing.
        
Adds a zero-mean Gaussian noise module to a DeterministicPolicy.
Adds a zero - mean Gaussian noise module to a DeterministicPolicy .
def add_gaussian_noise(cls, policy, noise_stddev: float):
        if policy.noise is not None:
            warnings.warn(
                "Adding Gaussian noise to already noisy policy. Are you sure you"
                " called `add_gaussian_noise` on the right policy?"
            )
        noise = nnx.GaussianNoise(noise_stddev)
        return cls(policy.encoder, policy.action_linear, policy.squashing, noise=noise)
def add_gaussian_noise ( cls , policy , noise_stddev : float ) : if policy . noise is not None : warnings . warn ( "Adding Gaussian noise to already noisy policy. Are you sure you" " called `add_gaussian_noise` on the right policy?" ) noise = nnx . GaussianNoise ( noise_stddev ) return cls ( policy . encoder , policy . action_linear , policy . squashing , noise = noise )
Adds a zero-mean Gaussian noise module to a DeterministicPolicy.
Adds a zero - mean Gaussian noise module to a DeterministicPolicy .
"""Adds a zero-mean Gaussian noise module to a DeterministicPolicy.

        Args:
            policy: The deterministic policy.
            noise_stddev: Standard deviation of the Gaussian noise

        Returns:
            A deterministic policy sharing all paremeters with the input one and
            with additional noise module before squashing.
        """
A deterministic policy sharing all paremeters with the input one and
with additional noise module before squashing.
A deterministic policy sharing all paremeters with the input one and with additional noise module before squashing .
cls
policy
The deterministic policy.
The deterministic policy .
noise_stddev
float
Standard deviation of the Gaussian noise
Standard deviation of the Gaussian noise