Performance Optimizations when skip_conditioning=True

This commit is contained in:
Dominik Moritz Roth 2023-05-21 17:37:45 +02:00
parent 4ba7db831f
commit 35df8f44da

View File

@ -183,6 +183,9 @@ class PCA_Distribution(SB3_Distribution):
return traj[:, -self.window:, :]
def _conditioning_engine(self, trajectory, pi_mean, pi_std):
if self.skip_conditioning:
return pi_mean, pi_std
traj = self._pad_and_cut_trajectory(trajectory)
y_np = np.append(np.swapaxes(traj, -1, -2),
np.expand_dims(pi_mean, -1), -1)