Skip to content

Why are observation_embed and action at the same “t” in the rollout_representation function? #84

@thj926

Description

@thj926

Hi, I'm confused... In rnns.py,there is a function as follows:

def rollout_representation(self, steps: int, obs_embed: torch.Tensor, action: torch.Tensor,
                           prev_state: RSSMState):
    priors = []
    posteriors = []
    for t in range(steps):
        prior_state, posterior_state = self.representation_model(obs_embed[t], action[t], prev_state)
        priors.append(prior_state)
        posteriors.append(posterior_state)
        prev_state = posterior_state
    prior = stack_states(priors, dim=0)
    post = stack_states(posteriors, dim=0)
    return prior, post

According to the original formula in paper, the input of the representation model should be the action at the previous moment and the obs_embed at the current moment?
So why is it the same moment here <prior_state, posterior_state = self.representation_model(obs_embed[t], action[t], prev_state)>?
Maybe I missed some details, please help me to resolve my confusion. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions