reaver icon indicating copy to clipboard operation
reaver copied to clipboard

Issue running StarCraft II agent on CPU only setup

Open y1han opened this issue 7 years ago • 3 comments

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

y1han avatar Jan 28 '19 12:01 y1han

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

inoryy avatar Jan 28 '19 12:01 inoryy

So it's not possible to work without GPU?

y1han avatar Jan 28 '19 14:01 y1han

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.

inoryy avatar Jan 28 '19 16:01 inoryy