52c94b7ee970da69721ca64f291e38556310482e,rllib/agents/sac/sac_torch_model.py,SACTorchModel,get_q_values,#SACTorchModel#Any#Any#,160
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.q_net(torch.cat([model_out, actions], -1))
// Discrete case -> return q-vals for all actions.
else:
return self.q_net(model_out)
def get_twin_q_values(self,
model_out: TensorType,
actions: Optional[TensorType] = None) -> TensorType:
Same as get_q_values but using the twin Q net.
After Change
Returns:
TensorType: Q-values tensor of shape [BATCH_SIZE, 1].
return self._get_q_value(model_out, actions, self.q_net)
def get_twin_q_values(self,
model_out: TensorType,
actions: Optional[TensorType] = None) -> TensorType:
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_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_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_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_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