run_dqn_atari.py 文件源码

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

项目:rl_algorithms 作者: DanielTakeshi 项目源码 文件源码
def get_session():
    tf.reset_default_graph()
    tf_config = tf.ConfigProto(
        inter_op_parallelism_threads=1,
        intra_op_parallelism_threads=1)

    # This was the default provided in the starter code.
    #session = tf.Session(config=tf_config)

    # Use this if I want to see what is on the GPU.
    #session = tf.Session(config=tf.ConfigProto(log_device_placement=True))

    # Use this for limiting memory allocated for the GPU.
    gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.5)
    session = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))

    print("AVAILABLE GPUS: ", get_available_gpus())
    return session
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号