52c94b7ee970da69721ca64f291e38556310482e,rllib/agents/sac/sac_tf_model.py,SACTFModel,get_twin_q_values,#SACTFModel#Any#Any#,171

Before Change


            TensorType: Q-values tensor of shape [BATCH_SIZE, 1].
        
        // Continuous case -> concat actions to model_out.
        if actions is not None:
            return self.twin_q_net([model_out, actions])
        // Discrete case -> return q-vals for all actions.
        else:
            return self.twin_q_net(model_out)

    def get_policy_output(self, model_out: TensorType) -> TensorType:
        Returns policy outputs, given the output of self.__call__().

        For continuous action spaces, these will be the mean/stddev

After Change


        Returns:
            TensorType: Q-values tensor of shape [BATCH_SIZE, 1].
        
        return self._get_q_value(model_out, actions, self.twin_q_net)

    def _get_q_value(self, model_out, actions, net):
        // Model outs may come as original Tuple/Dict observations, concat them
        // here if this is the case.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: ray-project/ray
Commit Name: 52c94b7ee970da69721ca64f291e38556310482e
Time: 2021-02-02
Author: sven@anyscale.io
File Name: rllib/agents/sac/sac_tf_model.py
Class Name: SACTFModel
Method Name: get_twin_q_values


Project Name: ray-project/ray
Commit Name: 52c94b7ee970da69721ca64f291e38556310482e
Time: 2021-02-02
Author: sven@anyscale.io
File Name: rllib/agents/sac/sac_torch_model.py
Class Name: SACTorchModel
Method Name: get_q_values


Project Name: ray-project/ray
Commit Name: 52c94b7ee970da69721ca64f291e38556310482e
Time: 2021-02-02
Author: sven@anyscale.io
File Name: rllib/agents/sac/sac_tf_model.py
Class Name: SACTFModel
Method Name: get_q_values


Project Name: ray-project/ray
Commit Name: 52c94b7ee970da69721ca64f291e38556310482e
Time: 2021-02-02
Author: sven@anyscale.io
File Name: rllib/agents/sac/sac_torch_model.py
Class Name: SACTorchModel
Method Name: get_twin_q_values