def get_train_data(self, states: torch.Tensor, actions: torch.Tensor) -> Tuple[(torch.Tensor, torch.Tensor, torch.Tensor)]:
    (mu, sigma, log_coeff, V_hat) = self(states)
    num_actions = actions.shape[(- 1)]
    mu = mu.unsqueeze(dim=1).expand(((- 1), num_actions, (- 1)))
    sigma = sigma.unsqueeze(dim=1).expand(((- 1), num_actions, (- 1)))
    log_coeff = log_coeff.unsqueeze(dim=1).expand(((- 1), num_actions, (- 1)))
    mix = D.Categorical(logits=log_coeff)
    component: Union[(D.Normal, SquashedNormal)]
    if self.action_bound:
        component = SquashedNormal(mu, sigma, self.action_bound)
    else:
        component = D.Normal(mu, sigma)
    gmm = D.MixtureSameFamily(mix, component)
    log_probs = gmm.log_prob(actions)
    entropy = (- log_probs.mean(dim=(- 1)))
    return (log_probs, entropy, V_hat)
def get_train_data(self, states: torch.Tensor, actions: torch.Tensor) -> Tuple[(torch.Tensor, torch.Tensor, torch.Tensor)]:
    (mu, sigma, log_coeff, V_hat) = self(states)
    num_actions = actions.shape[(- 1)]
    mu = mu.unsqueeze(dim=1).expand(((- 1), num_actions, (- 1)))
    sigma = sigma.unsqueeze(dim=1).expand(((- 1), num_actions, (- 1)))
    log_coeff = log_coeff.unsqueeze(dim=1).expand(((- 1), num_actions, (- 1)))
    mix = D.Categorical(logits=log_coeff)
    component: Union[(D.Normal, SquashedNormal)]
    if self.action_bound:
        component = SquashedNormal(mu, sigma, self.action_bound)
    else:
        component = D.Normal(mu, sigma)
    gmm = D.MixtureSameFamily(mix, component)
    log_probs = gmm.log_prob(actions)
    entropy = (- log_probs.mean(dim=(- 1)))
    return (log_probs, entropy, V_hat)