|
QDpy
|
Portable bounded Gaussian actor with an observation-dependent mean and scale. More...
Public Member Functions | |
| save (self, path) | |
| Save a portable numeric actor without a simulator or optimizer. | |
| load (cls, path, *, device="cpu", seed=0) | |
| Restore the actor without constructing a learner or environment. | |
| Public Member Functions inherited from qdpy.rl.policy._FlatPolicy | |
| act (self, observation, deterministic=True) | |
| Choose a deterministic action or sample from the actor. | |
Protected Member Functions | |
| _sample_actions (self, observations, generator) | |
Portable bounded Gaussian actor with an observation-dependent mean and scale.
Map fixed Box observations to continuous actions with a squashed Gaussian. The actor predicts a diagonal Gaussian mean and scale from the observation. The act method uses the squashed mean by default. Set deterministic=False to sample. Both paths restore the original Box shape, dtype and bounds. :param observation_space: Fixed-shape numeric Gymnasium Box. :param action_space: Finite floating-point Gymnasium Box. :param config: Optional actor architecture as a PolicyConfig. :param seed: Nonnegative seed for initialization and stochastic inference. :param device: Torch CPU or CUDA device.
|
protected |
| qdpy.rl.sac.SACPolicy.load | ( | cls, | |
| path, | |||
| * | , | ||
| device = "cpu", | |||
| seed = 0 ) |
Restore the actor without constructing a learner or environment.
Load a SAC actor with a fresh stochastic inference generator.
Reimplemented from qdpy.rl.policy.ContinuousPolicy.
| qdpy.rl.sac.SACPolicy.save | ( | self, | |
| path ) |
Save a portable numeric actor without a simulator or optimizer.
Write the architecture, bounds, and weights to a versioned NPZ file.
Reimplemented from qdpy.rl.policy.ContinuousPolicy.