File size: 1,195 Bytes
8796ba9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
from __future__ import annotations
from transformers import PretrainedConfig
class MrBalanceConfig(PretrainedConfig):
"""
Configuration for the MrBalance continuous-control Actor-Critic MLP.
"""
model_type = "mrbalance"
def __init__(
self,
observation_size: int = 64,
hidden_size: int = 128,
intermediate_size: int = 128,
bottleneck_size: int = 64,
action_size: int = 2,
actor_log_std_init: float = -0.75,
activation: str = "silu",
action_squashing: str = "tanh",
action_names=None,
**kwargs,
):
self.observation_size = observation_size
self.hidden_size = hidden_size
self.intermediate_size = intermediate_size
self.bottleneck_size = bottleneck_size
self.action_size = action_size
self.actor_log_std_init = actor_log_std_init
self.activation = activation
self.action_squashing = action_squashing
self.action_names = (
action_names
if action_names is not None
else ["roll", "pitch"]
)
super().__init__(**kwargs)
|