return torch.squeeze(a, dim=0).detach().numpy()
def distribution(self, state):
s = torch.tensor(state, dtype=torch.float)
return self.distribution_t(s)
def entropy(self, state=None):
s = torch.tensor(state, dtype=torch.float) if state is not None else None
After Change
return torch.squeeze(a, dim=0).detach().cpu().numpy()
def distribution(self, state):
s = self._to_tensor(state)
return self.distribution_t(s)
def entropy(self, state=None):
s = self._to_tensor(state) if state is not None else None