inoryy / reaver

Reaver: Modular Deep Reinforcement Learning Framework. Focused on StarCraft II. Supports Gym, Atari, and MuJoCo.
MIT License
554 stars 89 forks source link

Issue running StarCraft II agent on CPU only setup #23

Open y1han opened 5 years ago

y1han commented 5 years ago

First, if I run python -m reaver.run --env MoveToBeacon --agent a2c --n_envs 4 2> stderr.log I get UnimplementedError (see above for traceback): Generic conv implementation only supports NHWC tensor format for now. So I changed line67 in run.py into if not int(args.gpu) And after that, this problem seems to be solved, but I got another Problem whenever the game loading is done:ValueError: Argument is out of range for 12/Attack_screen (3/queued [2]; 0/screen [0, 0]), got: [[1], [8, 40]] The Argument that is out of range is not the same each time. So is there something I overlooked? Thx

inoryy commented 5 years ago

GPU is required for StarCraft II agents, make sure you've installed tensorflow-gpu

y1han commented 5 years ago

So it's not possible to work without GPU?

inoryy commented 5 years ago

I tried to maintain CPU version for awhile but it gets really annoying keeping up with transpositions. The issue boils down to that I use NCHW format for GPU but as you can see from error only NHWC is supported on CPU. To fix it you'd need to transpose data before inputting and set data_format = channels_last in the model.