f5e2cda68ae6035793686780c952d2083d98cf54,rllib/agents/sac/tests/test_sac.py,TestSAC,test_sac_loss_function,#TestSAC#,74

Before Change


                // Actually convert to torch tensors (by accessing everything).
                input_ = policy._lazy_tensor_dict(input_)
                input_ = {k: input_[k] for k in input_.keys()}
                log_alpha = policy.model.log_alpha.detach().numpy()[0]

            // Only run the expectation once, should be the same anyways
            // for all frameworks.

After Change


                // Actually convert to torch tensors (by accessing everything).
                input_ = policy._lazy_tensor_dict(input_)
                input_ = {k: input_[k] for k in input_.keys()}
                log_alpha = policy.model.log_alpha.detach().cpu().numpy()[0]

            // Only run the expectation once, should be the same anyways
            // for all frameworks.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ray-project/ray
Commit Name: f5e2cda68ae6035793686780c952d2083d98cf54
Time: 2020-10-12
Author: sven@anyscale.io
File Name: rllib/agents/sac/tests/test_sac.py
Class Name: TestSAC
Method Name: test_sac_loss_function


Project Name: deepchem/deepchem
Commit Name: 0334729ef04acbc33a0663e10d991df063f01b95
Time: 2020-08-07
Author: peastman@stanford.edu
File Name: deepchem/models/torch_model.py
Class Name: TorchModel
Method Name: _create_value_map


Project Name: deepchem/deepchem
Commit Name: 0334729ef04acbc33a0663e10d991df063f01b95
Time: 2020-08-07
Author: peastman@stanford.edu
File Name: deepchem/models/torch_model.py
Class Name: TorchModel
Method Name: _predict