f2a7ac7952dfd93abdfdb3a2e1dbed96066ab191,catalyst/rl/core/policy_handler.py,PolicyHandler,_get_q_values,#PolicyHandler#Any#Any#Any#,38

Before Change



    @torch.no_grad()
    def _get_q_values(self, critic: CriticSpec, state: np.ndarray, device):
        states = torch.Tensor(state).to(device).unsqueeze(0)
        output = critic(states)
        // We use the last head to perform actions
        // This is the head corresponding to the largest gamma
        if self.value_distribution == "categorical":

After Change



    @torch.no_grad()
    def _get_q_values(self, critic: CriticSpec, state: np.ndarray, device):
        states = _state2device(state, device)
        output = critic(states)
        // We use the last head to perform actions
        // This is the head corresponding to the largest gamma
        if self.value_distribution == "categorical":
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: catalyst-team/catalyst
Commit Name: f2a7ac7952dfd93abdfdb3a2e1dbed96066ab191
Time: 2019-06-25
Author: scitator@gmail.com
File Name: catalyst/rl/core/policy_handler.py
Class Name: PolicyHandler
Method Name: _get_q_values


Project Name: catalyst-team/catalyst
Commit Name: f2a7ac7952dfd93abdfdb3a2e1dbed96066ab191
Time: 2019-06-25
Author: scitator@gmail.com
File Name: catalyst/rl/core/policy_handler.py
Class Name: PolicyHandler
Method Name: _sample_from_actor