Пример #1
0
 def deterministic(self, params: List[TensorDict]) -> List[SampleLogp]:
     futures = [
         fork(m.deterministic, params[i]) for i, m in enumerate(self)
     ]
     return [wait(f) for f in futures]
Пример #2
0
 def log_prob(self, new_obs: List[Tensor],
              params: List[TensorDict]) -> List[Tensor]:
     futures = [
         fork(m.log_prob, new_obs[i], params[i]) for i, m in enumerate(self)
     ]
     return [wait(f) for f in futures]
Пример #3
0
 def forward(self, obs: Tensor, act: Tensor, new_obs: Tensor) -> List[Tensor]:
     futures = [fork(loss, obs, act, new_obs) for loss in self]
     return [wait(f) for f in futures]
Пример #4
0
 def forward(self, obs: List[Tensor],
             act: List[Tensor]) -> List[TensorDict]:
     futures = [fork(m, obs[i], act[i]) for i, m in enumerate(self)]
     return [wait(f) for f in futures]
Пример #5
0
 def _state_values(self, obs: Tensor) -> List[Tensor]:
     futures = [fork(m, obs) for m in self]
     return [wait(f) for f in futures]