def predict_dynamics(self, state_batch: th.Tensor, action_batch: th.Tensor):
    assert (state_batch.size()[0] == action_batch.size()[0]), f'state batch and action batch have different sizes, respectively {state_batch.size()[0]} and {action_batch.size()[0]}'
    assert (state_batch.size()[1] == self._dyn_encoding_size), f"States have wrong size, should be {self._dyn_encoding_size}, but it's {state_batch.size()[1]}"
    assert (action_batch.size()[1] == self._action_size), f"Actions have wrong size, should be {self._action_size} but it's {action_batch.size()[1]}"
    state_action_batch = th.cat((state_batch, action_batch), 1)
    nextstate_reward_batch = self._dynamics_net(state_action_batch)
    (nextstate_batch, reward_batch) = th.split(nextstate_reward_batch, [self._dyn_encoding_size, 1], 1)
    return (nextstate_batch, reward_batch)
def predict_dynamics(self, state_batch: th.Tensor, action_batch: th.Tensor):
    assert (state_batch.size()[0] == action_batch.size()[0]), f'state batch and action batch have different sizes, respectively {state_batch.size()[0]} and {action_batch.size()[0]}'
    assert (state_batch.size()[1] == self._dyn_encoding_size), f"States have wrong size, should be {self._dyn_encoding_size}, but it's {state_batch.size()[1]}"
    assert (action_batch.size()[1] == self._action_size), f"Actions have wrong size, should be {self._action_size} but it's {action_batch.size()[1]}"
    state_action_batch = th.cat((state_batch, action_batch), 1)
    nextstate_reward_batch = self._dynamics_net(state_action_batch)
    (nextstate_batch, reward_batch) = th.split(nextstate_reward_batch, [self._dyn_encoding_size, 1], 1)
    return (nextstate_batch, reward_batch)