QDpy
Loading...
Searching...
No Matches
qdpy.rl.smerl.SMERLPolicy Class Reference

A portable continuous-action actor with a discrete skill input. More...

Inheritance diagram for qdpy.rl.smerl.SMERLPolicy:
qdpy.rl.ssd.SSDPolicy

Public Member Functions

 num_skills (self)
 device (self)
 act (self, observation, skill, deterministic=True)
 Infer an action at a given discovered skill.
 save (self, path)
 Export the skill-conditioned actor without replay or a discriminator.
 load (cls, path, *, device="cpu", seed=0)
 Load a policy independently of training and environment setup.

Detailed Description

A portable continuous-action actor with a discrete skill input.

Use a fixed-shape Box observation and skill index to select a physical Box action.

Definition at line 68 of file smerl.py.

Member Function Documentation

◆ act()

qdpy.rl.smerl.SMERLPolicy.act ( self,
observation,
skill,
deterministic = True )

Infer an action at a given discovered skill.

Parameters
observationNumeric Gymnasium Box observation.
skillSkill ID in range(num_skills).
deterministicUse the squashed mean when true.
Return one physical action for a zero-based skill ID.

Definition at line 106 of file smerl.py.

◆ device()

qdpy.rl.smerl.SMERLPolicy.device ( self)
Return the Torch device of the actor.

Definition at line 89 of file smerl.py.

◆ load()

qdpy.rl.smerl.SMERLPolicy.load ( cls,
path,
* ,
device = "cpu",
seed = 0 )

Load a policy independently of training and environment setup.

Restore the actor and a fresh inference random stream.

Definition at line 122 of file smerl.py.

◆ num_skills()

qdpy.rl.smerl.SMERLPolicy.num_skills ( self)
Return the number of skill IDs.

Definition at line 84 of file smerl.py.

◆ save()

qdpy.rl.smerl.SMERLPolicy.save ( self,
path )

Export the skill-conditioned actor without replay or a discriminator.

Write a numeric policy artifact for inference.

Definition at line 114 of file smerl.py.


The documentation for this class was generated from the following file: