| 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) | |