def forward_pass(self, lgc): xdist = Gaussian(self.dm_state, self.nb_steps + 1) udist = Gaussian(self.dm_act, self.nb_steps) xudist = Gaussian(self.dm_state + self.dm_act, self.nb_steps + 1) xdist.mu, xdist.sigma,\ udist.mu, udist.sigma,\ xudist.mu, xudist.sigma = forward_pass(self.xdist.mu[..., 0], self.xdist.sigma[..., 0], self.dyn.A, self.dyn.B, self.dyn.c, self.dyn.sigma, lgc.K, lgc.kff, lgc.sigma, self.dm_state, self.dm_act, self.nb_steps) return xdist, udist, xudist
def forward_pass(self, lgc): """ Forward pass on linearized system :param lgc: :return: """ xdist = Gaussian(self.nb_xdim, self.nb_steps + 1) udist = Gaussian(self.nb_udim, self.nb_steps) xudist = Gaussian(self.nb_xdim + self.nb_udim, self.nb_steps + 1) xdist.mu, xdist.sigma,\ udist.mu, udist.sigma,\ xudist.mu, xudist.sigma = forward_pass(self.xdist.mu[..., 0], self.xdist.sigma[..., 0], self.dyn.A, self.dyn.B, self.dyn.c, self.dyn.sigma, lgc.K, lgc.kff, lgc.sigma, self.nb_xdim, self.nb_udim, self.nb_steps) return xdist, udist, xudist