RLlib

framework 默认使用 tf1

# tf: TensorFlow (static-graph)
# tf2: TensorFlow 2.x (eager)
# tfe: TensorFlow eager
# torch: PyTorch
--config='{"framework": "tf"}'
--config='{"framework": "tf2"}'
# Enable tracing in eager mode. This greatly improves performance, but
# makes it slightly harder to debug since Python code won't be evaluated
# after the initial eager pass. Only possible if framework=tfe.
--config='{"framework": "tf2", "eager_tracing": true}'
--config='{"framework": "tfe"/"tf2"}'
--config='{"framework": "torch"}'
--torch

tf 测试命令

rllib train --run PPO --env PongDeterministic-v4 --checkpoint-freq 100 \
    --config '{"num_workers": 8, "num_gpus": 1}'

pytorch 测试命令

rllib train --run PPO --env PongDeterministic-v4 --checkpoint-freq 100 \
    --config '{"framework": "torch", "num_workers": 8, "num_gpus": 1}'

tensorboard 可视化

tensorboard --logdir=~/ray_results --port 80

模型评估

rllib rollout \
    ~/ray_results/default/PPO_PongDeterministic-v4_0upjmdgr0/checkpoint_1/checkpoint-1 \
    --run PPO --env PongDeterministic-v4 --steps 10000
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值