:param birdview: th.Tensor (num_envs, frame_stack*channel, height, width) :param state: th.Tensor (num_envs, state_dim)
(self, birdview: th.Tensor, state: th.Tensor)
| 100 | self.optimizer = self.optimizer_class(self.parameters(), **self.optimizer_kwargs) |
| 101 | |
| 102 | def _get_features(self, birdview: th.Tensor, state: th.Tensor) -> th.Tensor: |
| 103 | """ |
| 104 | :param birdview: th.Tensor (num_envs, frame_stack*channel, height, width) |
| 105 | :param state: th.Tensor (num_envs, state_dim) |
| 106 | """ |
| 107 | birdview = birdview.float() / 255.0 |
| 108 | features, cnn_feature = self.features_extractor(birdview, state) |
| 109 | return features, cnn_feature |
| 110 | |
| 111 | def _get_action_dist_from_features(self, features: th.Tensor): |
| 112 | latent_pi = self.policy_head(features) |
no outgoing calls
no test coverage detected