TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first
sorry,when I run the commond"python3 src/main.py --config=res_qmix --env-config=sc2 with env_args.map_name=2s3z seed=2" I get this error: `Traceback (most recent call last): File "C:\Users\admin.conda\envs\pymarl-2\lib\site-packages\sacred\experiment.py", line 318, in run_commandline options=args, File "C:\Users\admin.conda\envs\pymarl-2\lib\site-packages\sacred\experiment.py", line 276, in run run() File "C:\Users\admin.conda\envs\pymarl-2\lib\site-packages\sacred\run.py", line 238, in call self.result = self.main_function(*args) File "C:\Users\admin.conda\envs\pymarl-2\lib\site-packages\sacred\config\captured_function.py", line 42, in captured_function result = wrapped(*args, **kwargs) File "src/main.py", line 63, in my_main run(_run, config, _log) File "D:\xjt-bishe\code\smac\compare_code\RES-master\src\run.py", line 204, in run run_sequential(args=args, logger=logger) File "D:\xjt-bishe\code\smac\compare_code\RES-master\src\run.py", line 447, in run_sequential stats = logger.print_recent_stats() File "D:\xjt-bishe\code\smac\compare_code\RES-master\src\utils\logging.py", line 50, in print_recent_stats item = "{:.4f}".format(np.mean([x[1] for x in self.stats[k][-window:]])) File "<array_function internals>", line 6, in mean File "C:\Users\admin.conda\envs\pymarl-2\lib\site-packages\numpy\core\fromnumeric.py", line 3441, in mean out=out, **kwargs) File "C:\Users\admin.conda\envs\pymarl-2\lib\site-packages\numpy\core_methods.py", line 163, in _mean arr = asanyarray(a) File "C:\Users\admin.conda\envs\pymarl-2\lib\site-packages\torch\tensor.py", line 480, in array return self.numpy() TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
During handling of the above exception, another exception occurred:` How can I solve it,thank you~