首页 > 其他分享 >the random noise and the gaussian noise

the random noise and the gaussian noise

时间:2022-10-10 21:23:40浏览次数:52  
标签:noise torch clip random gaussian action size

            if use_noise == "random noise":

                noise = (

                    torch.randn_like(torch.Tensor(action)) * policy_noise

                ).clamp(-noise_clip, noise_clip).numpy()

                action = (action + noise).clip(-max_action, max_action)

            if use_noise == "gaussian noise":

                noise_size = (torch.Tensor(action).size()[0],)

                import pdb

                pdb.set_trace()

                noise = (

                    torch.normal(mean=0.,std=policy_noise,size=noise_size)

                ).clamp(-noise_clip, noise_clip).numpy()

标签:noise,torch,clip,random,gaussian,action,size
From: https://www.cnblogs.com/leifzhang/p/16777404.html

相关文章