RLlib

RLlib,第1张

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 '{"framework": "tf", "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

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5443174.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-11
下一篇2022-12-11

发表评论

登录后才能评论

评论列表(0条)

    保存