def forward(self, obs: torch.Tensor, actions: torch.Tensor) -> ttorch.Tensor:
        """
        **Overview**:
            Forward computation of the MLP network with popart layer.
        """
        # The encoder first concatenate the observation vectors and actions,
        # then map the input to an embedding vector.
        x = torch.cat((obs, actions), 1)
        x = self.encoder(x)
        # The popart layer maps the embedding vector to a normalized value.
        x = self.popart(x)
        return x

        **Overview**:
            Forward computation of the MLP network with popart layer.
        
chapter4_reward/popart.py