Closed SpeedCoder5 closed 3 years ago
Reading parameters like:
params = common.HYPERPARAMS['pong']
and creating the environment thusly:
env = gym.make(params['env_name'])
env = ptan.common.wrappers.wrap_dqn(env,stack_frames=4)
and modifying line 42 to:
state_v = torch.tensor(np.array([np.array(state, copy=False)], copy=False))
resolved the issue for me. Solution for these two issues helped:
It really helped me to run Chapter06/03_dqn_play.py to see an example video of how the actual game played. What is the best way to go about saving Atari models built with ptan in Chapter07 and beyond and also play back a video of how they worked.
I tried merging ptan code from Chapter07 into Chapter06/03_dqn_play.py and get an error on line 42:
state_v = torch.tensor(np.array([state], copy=False)) TypeError: int() argument must be a string, a bytes-like object or a number, not 'LazyFrames'
What is LazyFrames?