922d15e8775a6dcd30725498cd45754ea49a59a0,ptan/agent.py,PolicyAgent,__call__,#PolicyAgent#Any#Any#,115

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)
        probs_v = self.model(states)
        if self.apply_softmax:
            probs_v = F.softmax(probs_v, dim=1)
        probs = probs_v.data.cpu().numpy()

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)
        probs_v = self.model(states)
        if self.apply_softmax:
            probs_v = F.softmax(probs_v, dim=1)
        probs = probs_v.data.cpu().numpy()
Italian Trulli
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: 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: 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: ActorCriticAgent
Method Name: __call__