浏览代码

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

/exp-tanh
GitHub 4 年前
当前提交
3c1e98ca
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 1
      ml-agents/mlagents/trainers/torch/distributions.py

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


# throws error on runtime broadcasting due to unknown reason. We
# use this to replace torch.expand() because it is not supported in
# the verified version of Barracuda (1.0.X).
# log_sigma = mu * 0 + self.log_sigma
log_sigma = mu * 0 + torch.clamp(self.log_sigma, -20, 2)
if self.tanh_squash:
return TanhGaussianDistInstance(mu, torch.exp(log_sigma))

正在加载...
取消
保存