MCPcopy Create free account
hub / github.com/TeleHuman/PBHC / forward

Method forward

humanoidverse/agents/modules/agent_modules.py:70–80  ·  view source on GitHub ↗
(self, obs_dict, hist_encoding: bool, obs_key="actor_obs", target_key="future_motion_targets")

Source from the content-addressed store, hash-verified

68 return priv_embedding
69
70 def forward(self, obs_dict, hist_encoding: bool, obs_key="actor_obs", target_key="future_motion_targets"):
71 motion_embedding = self.motion_encoding(obs_dict[target_key])
72
73 if hist_encoding:
74 latent = self.history_encoding(obs_dict["prop_history"])
75 else:
76 latent = self.priv_encoding(obs_dict["priv_obs"])
77
78 actor_obs = torch.cat([obs_dict[obs_key], motion_embedding, latent], dim=-1)
79 backbone_output = self.actor_module(actor_obs)
80 return backbone_output
81
82
83class ActorCritic(nn.Module):

Callers

nothing calls this directly

Calls 3

motion_encodingMethod · 0.95
history_encodingMethod · 0.95
priv_encodingMethod · 0.95

Tested by

no test coverage detected