main.py 文件源码

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

项目:unreal-implementation 作者: 404akhan 项目源码 文件源码
def _build_vr_network(self):
        self.vr_states = tf.placeholder(shape=[None, 80, 80, 4], dtype=tf.float32)
        self.vr_value_targets = tf.placeholder(shape=[None], dtype=tf.float32)

        with tf.variable_scope("shared", reuse=True):
            conv2 = self.build_shared_network(self.vr_states)

        fc1 = tf.contrib.layers.fully_connected(
            inputs=tf.contrib.layers.flatten(conv2),
            num_outputs=256,
            scope="fc1",
            reuse=True)

        self.vr_value = tf.contrib.layers.fully_connected(
            inputs=fc1,
            num_outputs=1,
            activation_fn=None,
            scope='logits_value',
            reuse=True)

        self.vr_value = tf.squeeze(self.vr_value, squeeze_dims=[1])

        self.vr_losses = tf.squared_difference(self.vr_value, self.vr_value_targets)
        self.vr_loss = tf.reduce_sum(self.vr_losses)
        self.vr_loss = self.pc_vr_lambda * self.vr_loss
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号