Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The error occurs when I train level=3 and agent_mode=“escape”, because the matrix multiplication does not match #11

Open
sakulall opened this issue Sep 10, 2024 · 6 comments

Comments

@sakulall
Copy link

屏幕截图 2024-09-10 143919 屏幕截图 2024-09-10 143956
@ardian-selmonaj
Copy link
Collaborator

Hi, based on your images you are inspecting the neural net "Fight1" which won't be used for mode=escape, but rather "Esc1". Try inspecting this network and if you correctly set the configuration. Because I tried escape mode exactly as it is on the master branch and it works. Let me know.

@sakulall
Copy link
Author

嗨,根据您的图像,您正在检查神经网络“Fight1”,它不会用于 ,而是“Esc1”。尝试检查此网络,以及是否正确设置了配置。因为我尝试了完全按照 master 分支上的转义模式,并且它有效。请告诉我。mode=escape

我解决了这个问题,我在配置的时候使用的是mode=Escape,结果出现了报错,我后来换成了 mode=escape,就成功了。

@sakulall
Copy link
Author

嗨,根据您的图像,您正在检查神经网络“Fight1”,它不会用于 ,而是“Esc1”。尝试检查此网络,以及是否正确设置了配置。因为我尝试了完全按照 master 分支上的转义模式,并且它有效。请告诉我。mode=escape
我想使用render这个配置。
parser.add_argument('--render', type=bool, default=False, help='Render the scene and show live behaviour'),但是我把他设置为True时,没有出现对应的效果,请问该如何实现。

@sakulall
Copy link
Author

I have another problem, I used the GPU to train Level 1-3, but when I train Level 4 I get an error, torch.cuda.device_count() is 0, but outside of this project, call torch.cuda.device_count() is 1.
屏幕截图 2024-09-10 155246
屏幕截图 2024-09-10 155345

@sakulall
Copy link
Author

Only when I set torch.load to cpu can I run through Level 4.

@ardian-selmonaj
Copy link
Collaborator

for GPU: keep your configuration the same throughout training, though I recommend CPU, as Ray is not very consistent with GPU.

for rendering: when you set render=True, there will be stored an image named 'current.png' within the log folder while interacting with the environment. That means, this image gets updated in every step, so while running the code, you can leave this image open and it should appear as "a video" as it is being refreshed. Check the function def evaluate () in train_hetero.py, there is the line env.plot(Path(args.log_path, "current.png")).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants