922d15e8775a6dcd30725498cd45754ea49a59a0,ptan/agent.py,DQNAgent,__call__,#DQNAgent#,66
Before Change
if agent_states is None:
agent_states = [None] * len(states)
if self.preprocessor is not None:
states = self.preprocessor(states).to(self.device)
q_v = self.dqn_model(states)
q = q_v.data.cpu().numpy()
actions = self.action_selector(q)
return actions, agent_states
After Change
if agent_states is None:
agent_states = [None] * len(states)
if self.preprocessor is not None:
states = self.preprocessor(states)
if torch.is_tensor(states):
states = states.to(self.device)
q_v = self.dqn_model(states)
q = q_v.data.cpu().numpy()
actions = self.action_selector(q)
return actions, agent_states
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances Project Name: Shmuma/ptan
Commit Name: 922d15e8775a6dcd30725498cd45754ea49a59a0
Time: 2018-04-29
Author: max.lapan@gmail.com
File Name: ptan/agent.py
Class Name: DQNAgent
Method Name: __call__
Project Name: Shmuma/ptan
Commit Name: 922d15e8775a6dcd30725498cd45754ea49a59a0
Time: 2018-04-29
Author: max.lapan@gmail.com
File Name: ptan/agent.py
Class Name: PolicyAgent
Method Name: __call__
Project Name: Shmuma/ptan
Commit Name: 922d15e8775a6dcd30725498cd45754ea49a59a0
Time: 2018-04-29
Author: max.lapan@gmail.com
File Name: ptan/agent.py
Class Name: ActorCriticAgent
Method Name: __call__