DQN初始化请教
Created by: livingbody
https://github.com/paddlepaddle/PARL/blob/develop/parl/algorithms/torch/dqn.py中DQN初始化如下:
在github中class DQN(parl.Algorithm):
def __init__(self, model, gamma=None, lr=None):
""" DQN algorithm
然而实际使用中如下:
class DQN(parl.Algorithm):
def __init__(self, model, act_dim=None, gamma=None, lr=None):
""" DQN algorithm
Args:
model (parl.Model): 定义Q函数的前向网络结构
act_dim (int): action空间的维度,即有几个action
gamma (float): reward的衰减因子
lr (float): learning rate 学习率.
"""