(self, obs_dict: Dict[str, np.ndarray])
| 165 | return actions, values, log_prob, mu, sigma, features |
| 166 | |
| 167 | def forward_value(self, obs_dict: Dict[str, np.ndarray]) -> np.ndarray: |
| 168 | with th.no_grad(): |
| 169 | obs_tensor_dict = dict([(k, th.as_tensor(v).to(self.device)) for k, v in obs_dict.items()]) |
| 170 | features = self._get_features(**obs_tensor_dict) |
| 171 | values = self.value_head(features) |
| 172 | values = values.cpu().numpy().flatten() |
| 173 | return values |
| 174 | |
| 175 | def forward_policy(self, obs_dict: Dict[str, np.ndarray]) -> np.ndarray: |
| 176 | with th.no_grad(): |
no test coverage detected