428516056abe41f135133e732a8d44af6ce9a234,rllib/utils/exploration/random.py,Random,get_torch_exploration_action,#Random#Any#Any#,83

Before Change



    def get_torch_exploration_action(self, action_dist, explore):
        tensor_fn = torch.LongTensor if \
            type(self.action_space) in [Discrete, MultiDiscrete] else \
            torch.FloatTensor
        if explore:
            // Unsqueeze will be unnecessary, once we support batch/time-aware

After Change


                action_dist.required_model_output_shape(
                    self.action_space, self.model.model_config))
            // Add a batch dimension.
            if len(action_dist.inputs.shape) == len(req) + 1:
                a = np.expand_dims(a, 0)
            action = torch.from_numpy(a).to(self.device)
        else:
            action = action_dist.deterministic_sample()
        logp = torch.zeros(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: ray-project/ray
Commit Name: 428516056abe41f135133e732a8d44af6ce9a234
Time: 2020-04-15
Author: sven@anyscale.io
File Name: rllib/utils/exploration/random.py
Class Name: Random
Method Name: get_torch_exploration_action


Project Name: catalyst-team/catalyst
Commit Name: 9f960738f0dee048bcea4c29dcabdbd98cad22dd
Time: 2020-10-21
Author: 19803638+bagxi@users.noreply.github.com
File Name: tests/_tests_cv_classification_transforms/experiment.py
Class Name: MNIST
Method Name: __getitem__


Project Name: deepmipt/DeepPavlov
Commit Name: 1a6d4020c53e2b39e224616481528fad901cbd4e
Time: 2018-10-15
Author: yoptar@gmail.com
File Name: deeppavlov/core/commands/infer.py
Class Name:
Method Name: predict_on_stream