networks.py 文件源码

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

项目:DDPG-tensorflow 作者: songrotek 项目源码 文件源码
def q_network(state,action,theta, name="q_network"):
  with tf.variable_op_scope([state,action],name,name):
    h0 = tf.identity(state,name='h0-state')
    h0a = tf.identity(action,name='h0-act')
    h1  = tf.nn.relu( tf.matmul(h0,theta[0]) + theta[1],name='h1')
    h1a = tf.concat(1,[h1,action])
    h2  = tf.nn.relu( tf.matmul(h1a,theta[2]) + theta[3],name='h2')
    qs  = tf.matmul(h2,theta[4]) + theta[5]
    q = tf.squeeze(qs,[1],name='h3-q')

    return q
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号