def forward(self, actions, batch_info):
        """ Return model step after applying noise """
        while len(self.processes) < actions.shape[0]:
            len_action_space = self.action_space.shape[-1]

            self.processes.append(
                OrnsteinUhlenbeckNoiseProcess(
                    np.zeros(len_action_space), float(self.std_dev) * np.ones(len_action_space)
                )
            )

        noise = torch.from_numpy(np.stack([x() for x in self.processes])).float().to(actions.device)

        return torch.min(torch.max(actions + noise, self.low_tensor), self.high_tensor)
def forward ( self , actions , batch_info ) : while len ( self . processes ) < actions . shape [ 0 ] : len_action_space = self . action_space . shape [ - 1 ] self . processes . append ( OrnsteinUhlenbeckNoiseProcess ( np . zeros ( len_action_space ) , float ( self . std_dev ) * np . ones ( len_action_space ) ) ) noise = torch . from_numpy ( np . stack ( [ x ( ) for x in self . processes ] ) ) . float ( ) . to ( actions . device ) return torch . min ( torch . max ( actions + noise , self . low_tensor ) , self . high_tensor )
Return model step after applying noise