net.py 文件源码

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

项目:chainer-dqn 作者: dsanno 项目源码 文件源码
def __init__(self, width=150, height=112, channel=3, action_size=100, latent_size=100):
        feature_width = width
        feature_height = height
        for i in range(4):
            feature_width = (feature_width + 1) // 2
            feature_height = (feature_height + 1) // 2
        feature_size = feature_width * feature_height * 64
        super(Q, self).__init__(
            conv1 = L.Convolution2D(channel, 16, 8, stride=4, pad=3),
            conv2 = L.Convolution2D(16, 32, 5, stride=2, pad=2),
            conv3 = L.Convolution2D(32, 64, 5, stride=2, pad=2),
            lstm  = L.LSTM(feature_size, latent_size),
            q     = L.Linear(latent_size, action_size),
        )
        self.width = width
        self.height = height
        self.latent_size = latent_size
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号