Closed iimmer closed 5 years ago
Which version of pytorch you're using? This bug looks like a some incompatibility in ptan with recent pytorch (only pytorch 0.4 is currently supported by examples).
Which version of pytorch you're using? This bug looks like a some incompatibility in ptan with recent pytorch (only pytorch 0.4 is currently supported by examples).
I have updated pytorch to 1.0, pytorch 0.4 is working ,thank you !
1.0.1, that may be the issue
Traceback (most recent call last): File "d:/Python/WS/PyTorch/Deep-Reinforcement-Learning-Hands-On/Chapter10/02_pong_a2c.py", line 159, in
tb_tracker.track("advantage", adv_v, step_idx)
File "D:\Python\WinPython3670\python-3.6.7.amd64\lib\site-packages\ptan\common\utils.py", line 329, in track
self.writer.add_scalar(param_name, np.mean(data), iter_index)
File "D:\Python\WinPython3670\python-3.6.7.amd64\lib\site-packages\numpy\core\fromnumeric.py", line 2957, in mean
out=out, **kwargs)
File "D:\Python\WinPython3670\python-3.6.7.amd64\lib\site-packages\numpy\core_methods.py", line 80, in _mean
ret = ret.dtype.type(ret / rcount)
AttributeError: 'torch.dtype' object has no attribute 'type'