linnaeushuang / pensieve-pytorch

MIT License
27 stars 10 forks source link

Should the initial state initialization be set without the outer array? #7

Closed kasimte closed 3 years ago

kasimte commented 4 years ago

Here,

https://github.com/linnaeushuang/pensieve-pytorch/blob/e9b8aeb0fbed9f41e31b7e0c514e60f0a0f7bcf5/pensieve_torch.py#L231

, should the initial state be set like this without the wrapping array?

state = torch.zeros((1,S_INFO, S_LEN))

Thanks.

linnaeushuang commented 4 years ago

well, this code should not be wrapped by array. I wrote this code in reference to hongzimao/pensieve/sim/multi_agent.py ,line271. I guess this code might have been used to handle some situations in older version. But in MAO's final version, this code would never be run.

kasimte commented 4 years ago

Thanks for commenting. I noticed that line in Mao's code too, and it seemed like a bug. I was just curious about your opinion.