conv_dqn_agent.py 文件源码

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

项目:deep-rl 作者: xinghai-sun 项目源码 文件源码
def __init__(self,
                 action_space,
                 observation_space,
                 batch_size=128,
                 learning_rate=1e-3,
                 discount=1.0,
                 epsilon=0.05):
        if not isinstance(action_space, spaces.Discrete):
            raise TypeError("Action space type should be Discrete.")
        self._action_space = action_space
        self._batch_size = batch_size
        self._discount = discount
        self._epsilon = epsilon
        self._q_network = ConvNet(
            num_channel_input=observation_space.shape[0],
            num_output=action_space.n)
        self._optimizer = optim.RMSprop(
            self._q_network.parameters(), lr=learning_rate)
        self._memory = ReplayMemory(100000)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号