V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wsinglewell
V2EX  ›  机器学习

为啥 m1max cpu 跑深度强化学习比 3900x + 2080s 的台式机快好多

  •  1
     
  •   wsinglewell · 43 天前 · 417 次点击
    这是一个创建于 43 天前的主题,其中的信息可能已经有所发展或是发生改变。
    叠甲:没系统学过深度学习和强化学习,所以可能不是很了解一些基础知识。

    最近想训练一个二维迷宫寻路智能体,从 linyiYi 这里抄了一个他贪吃蛇 ai 的板子拿过来改
    https://github.com/linyiLYi/snake-ai

    但是发现训练的时候,训练速度 m1max cpu >>> 2080s > m1max mps > 3900x cpu
    代码在这里: https://github.com/abmcar/NavigateAi/tree/main/main
    模型基本上都是用的默认的参数


    对这个训练速度的差异很奇怪,是因为我台式机没有配置好环境还是因为我训练的内容恰好适合 m1max cpu?



    另外想问一下,像这种简单问题,是不是调一个好的 reward 策略之后训练起来很快啊?之前跑没有加障碍物的 env ,跑了 5e7 步才能做到走最短路不撞墙一直吃到果子,感觉是 reward 没设置好。如果训练效果跟 reward 策略强相关的话,我需要学习一些理论知识来制定 reward 策略吗?或者还需要自己根据实际 env 手写模型并且调参?
    下面是之前无障碍的 reward 策略,https://github.com/abmcar/NavigateAi/blob/4d8cd82323305d69b65cfd21fb7a58808b992232/main/navigate_game_custom_wrapper_mlp.py
    4 条回复
    wsinglewell
        1
    wsinglewell  
    OP
       43 天前
    说错了速度应该是
    m1max cpu >> 3900x >> 2080s cuda >> m1max mps
    m1max cpu 2 iterations 用时 8.1s 1e5 step 15s
    m1max mps 2 iterations 用时 135s 1e5 step 240s
    2080s cuda 2 iterations 用时 65s 1e5 step 120s
    3900x cpu 2 iterations 用时 26s 1e5 step 48S


    wsinglewell
        2
    wsinglewell  
    OP
       43 天前
    @wsinglewell 上一张图是 2080s 和 3900x 下面这个是 m1max
    wsinglewell
        3
    wsinglewell  
    OP
       43 天前
    wsinglewell
        4
    wsinglewell  
    OP
       43 天前
    @wsinglewell #2
    @wsinglewell #3
    这图片上传功能真离谱...总是上传错...
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1039 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 18:36 · PVG 02:36 · LAX 11:36 · JFK 14:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.