def __init__(self, n_actions):
initializer = chainer.initializers.HeNormal()
c1 = 32
c2 = 64
c3 = 64
fc_unit = 256
super(QFunction, self).__init__(
# the size of the inputs to each layer will be inferred
conv1=L.Convolution2D(4, c1, 8, stride=4, pad=0),
conv2=L.Convolution2D(c1, c2, 4, stride=2, pad=0),
conv3=L.Convolution2D(c2, c3, 3, stride=1, pad=0),
#conv4=L.Convolution2D(64, c4, 3, stride=1, pad=1),
fc1=L.Linear(3136, fc_unit, initialW=initializer),
fc2=L.Linear(fc_unit, n_actions, initialW=initializer),
#bnorm1=L.BatchNormalization(c1),
#bnorm2=L.BatchNormalization(c2),
#bnorm3=L.BatchNormalization(c3),
#bnorm4=L.BatchNormalization(c4),
)
评论列表
文章目录