Skip to content

Target Updates

lerax.target.AbstractTargetUpdate

Bases: eqx.Module

Rule for refreshing a target network from an online network.

__call__ abstractmethod

__call__[T: eqx.Module](online: T, target: T) -> T

Return the updated target network.

lerax.target.SoftUpdate

Bases: AbstractTargetUpdate

Polyak averaging

target = tau * online + (1 - tau) * target.

Parameters:

Name Type Description Default
tau

Interpolation coefficient in [0, 1]. Default 0.005.

required

Attributes:

Name Type Description
tau float

Interpolation coefficient in [0, 1].

tau class-attribute instance-attribute

tau: float = 0.005

__call__

__call__[T: eqx.Module](online: T, target: T) -> T

lerax.target.HardUpdate

Bases: AbstractTargetUpdate

Hard copy.

__call__

__call__[T: eqx.Module](online: T, target: T) -> T