52c94b7ee970da69721ca64f291e38556310482e,rllib/agents/sac/sac_torch_model.py,SACTorchModel,get_policy_output,#SACTorchModel#Any#,209

Before Change


        Returns:
            TensorType: Distribution inputs for sampling actions.
        
        return self.action_model(model_out)

    def policy_variables(self):
        Return the list of variables for the policy net.

After Change


        // Model outs may come as original Tuple observations, concat them
        // here if this is the case.
        if isinstance(self.action_model.obs_space, Box):
            if isinstance(model_out, (list, tuple)):
                model_out = torch.cat(model_out, dim=-1)
            elif isinstance(model_out, dict):
                model_out = torch.cat(list(model_out.values()), dim=-1)
        out, _ = self.action_model({"obs": model_out}, [], None)
        return out

    def policy_variables(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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_policy_output


Project Name: OpenNMT/OpenNMT-py
Commit Name: 5e8936c90646daea4a0483f3fc73f6e0aa4b1c9e
Time: 2017-09-20
Author: jingxil@foxmail.com
File Name: onmt/modules/SRU.py
Class Name: SRU
Method Name: forward


Project Name: OpenNMT/OpenNMT-py
Commit Name: c13a558767cbc19b612968eb4d01a1f26d5df688
Time: 2017-06-10
Author: wangqian5730@gmail.com
File Name: onmt/Models.py
Class Name: NMTModel
Method Name: _fix_enc_hidden