当前位置: 首页 > 工具软件 > magent > 使用案例 >

配置MAgent的一些问题

益智明
2023-12-01
Traceback (most recent call last):
  File "/jiangjin/workplace/ai_workplace/DGN-master/Battle/multi_battle.py", line 118, in <module>
    env.set_render_dir("build/render")
  File "/jiangjin/workplace/ai_workplace/MAgent-master/magent/gridworld.py", line 430, in set_render_dir
    os.mkdir(name)
FileNotFoundError: [Errno 2] No such file or directory: 'build/render'



解决方法: 把相对路径修改成绝对路径


#env.set_render_dir("build/render")
env.set_render_dir("/jiangjin/workplace/ai_workplace/MAgent-master/build/render")
 
    h = merge([h1,h2,h3],mode='concat')
TypeError: 'module' object is not callable

keras merge报错Typeerror module object is not callable

 解决办法:
因为版本问题,现在的版本merge层不能这么用了。用concatenate代替

from keras.layers import concatenate
 
merged = concatenate([h1,h2,h3])

 

 类似资料: