Hi! Thanks for the great tutorials!
I had an issue with class DQN(nn.Module), in method act this thing
action = q_value.max(1)[1].data[0]
seemed to return some torch cuda tensor, that env.step naturally couldn't take as input.
I replaced it with with
action = int(q_value.max(1)[1].data[0].cpu().int().numpy())
and it works for me.
Hi! Thanks for the great tutorials! I had an issue with
class DQN(nn.Module)
, in methodact
this thingaction = q_value.max(1)[1].data[0]
seemed to return some torch cuda tensor, thatenv.step
naturally couldn't take as input. I replaced it with withaction = int(q_value.max(1)[1].data[0].cpu().int().numpy())
and it works for me.