浏览代码

Remove clip

/develop/torch-clip-scale
Ervin Teng 4 年前
当前提交
db6ebff6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      ml-agents/mlagents/trainers/torch/distributions.py

2
ml-agents/mlagents/trainers/torch/distributions.py


def sample(self):
sample = self.mean + torch.randn_like(self.mean) * self.std
return torch.clamp(sample, -3, 3) / 3
return sample / 3
def log_prob(self, value):
unscaled_val = value * 3 # Inverse of the clipping

正在加载...
取消
保存