Forward pass: observation tensor → action tensor. Args: x: Batch of observations, shape (batch_size, obs_dim). Returns: Batch of actions, shape (batch_size, act_dim), values in [-1, 1].
(self, x: torch.Tensor)
| 122 | ) |
| 123 | |
| 124 | def forward(self, x: torch.Tensor) -> torch.Tensor: |
| 125 | """Forward pass: observation tensor → action tensor. |
| 126 | |
| 127 | Args: |
| 128 | x: Batch of observations, shape (batch_size, obs_dim). |
| 129 | |
| 130 | Returns: |
| 131 | Batch of actions, shape (batch_size, act_dim), values in [-1, 1]. |
| 132 | """ |
| 133 | return self.net(x) |
| 134 | |
| 135 | def export_layers(self) -> list[dict]: |
| 136 | """Export weights and biases for the Rust policy JSON format. |