models.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:drl.pth 作者: seba-1511 项目源码 文件源码
def __init__(self, state_size, action_size):
        super(BaselineActor, self).__init__()
        self.fc1 = nn.Linear(state_size, 64, bias=True)
        self.fc2 = nn.Linear(64, 64, bias=True)
        self.mean = nn.Linear(64, action_size, bias=True)

        # Init
        for p in [self.fc1, self.fc2, self.mean]:
            p.weight.data.normal_(0, 1)
            p.weight.data *= 1.0 / th.sqrt(p.weight.data.pow(2).sum(1, keepdim=True))
            p.bias.data.mul_(0.0)

        self.mean.weight.data.mul_(0.01)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号