GithubHelp home page GithubHelp logo

Comments (7)

PaParaZz1 avatar PaParaZz1 commented on August 20, 2024

你这里的obs维度具体是多少?我猜你的问题是:输入高维的obs(应该是同时使用了自己定义的神经网络),导致collect_model.forward输出的last_value维度是(B, 1),从而使得在default_decollate函数中报错。

from di-engine.

jedz5 avatar jedz5 commented on August 20, 2024

比如输入是(256,9,100)9是agent数量 100是obs空间
经过forward后out[value]是256*[1,9],default_decollate后会变成256 * [9]
而计算last_value的时候输入是(1,9,100),输出是1*[1,9] 没有default_decollate中的降维逻辑,维度就对不上了

from di-engine.

PaParaZz1 avatar PaParaZz1 commented on August 20, 2024
  • 哦哦哦MARL的情况啊,可以稍等一周么,下周我们会推出MAPPO版本,现在的PPO实现确实是没考虑MARL的情况。
  • 如果你比较着急的话,可以先把batch sizeagent维度合并到一起,过这些模块,然后再拆一下。

from di-engine.

jedz5 avatar jedz5 commented on August 20, 2024

把batch size和agent维度合并到一起讲道理也是不行的,这样的话last_value就要取最后agent_num这么多个样本 不知道其他地方还会不会有问题,我现在试了下把default_decollate中的降维逻辑加到last_value上应该就可以了
if len(last_value.shape) > 1:
last_value = last_value.squeeze(0)

from di-engine.

PaParaZz1 avatar PaParaZz1 commented on August 20, 2024

嗯这件事还是得看你是对每个agent一个value还是多个agent使用同一个value,处理就需要case by case了。之后我们会整理一下各种情况,在MAPPO更新的版本中把相应各种情况都处理下,并给出具体的维度相关注释。

from di-engine.

jedz5 avatar jedz5 commented on August 20, 2024

好像要改造的地方确实还不少 大佬加油吧 坐等mappo了

from di-engine.

PaParaZz1 avatar PaParaZz1 commented on August 20, 2024

好的保持对这个issue的持续关注吧,我们之后也会持续更新相关内容

from di-engine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.